tasks: container_create: Retry if sysctl-container service failed to start

This aims to workaround an issue on openSUSE where the service may fail
to start with the following error:

sysctl-container.service: Failed at step CGROUP spawning /sbin/sysctl: No such device

Related-Bug: #1712741
Link: https://bugzilla.suse.com/show_bug.cgi?id=1055426
Change-Id: If66f1f9d0f51173890004b65c332f14fc878fb18
This commit is contained in:
Markos Chandras 2017-08-24 10:36:19 +01:00
parent c2244e88fb
commit ef8e1b7da0
1 changed files with 11 additions and 0 deletions

View File

@ -529,6 +529,13 @@
tags:
- lxc_container_create-sysctl
# NOTE(hwoarang) openSUSE randomly fails to start the service
# with an error like the following one
# sysctl-container.service: Failed at step CGROUP spawning /sbin/sysctl: No such device
# Until this is fixed, we workaround it by simply retrying a few more times
# before giving up
# https://bugzilla.suse.com/show_bug.cgi?id=1055426
# https://bugs.launchpad.net/openstack-ansible/+bug/1712741
- name: Enable container sysctl service
service:
name: "sysctl-container"
@ -536,6 +543,10 @@
enabled: yes
daemon_reload: yes
remote_user: root
register: _sysctl_service_started
until: _sysctl_service_started|success
retries: 5
delay: 5
tags:
- lxc_container_create-sysctl