From ef8e1b7da0c78791b970ce2e6650844bec98dbce Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 24 Aug 2017 10:36:19 +0100 Subject: [PATCH] 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 --- tasks/container_create.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasks/container_create.yml b/tasks/container_create.yml index df61ce3..640b088 100644 --- a/tasks/container_create.yml +++ b/tasks/container_create.yml @@ -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