From a8d03a261adb2f06c1ce7c9381c2d80b4bfd4fc9 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Fri, 13 Sep 2024 09:30:19 +0200 Subject: [PATCH] systemd: Add Wants=docker.service for docker In I70dd1751dea6bfc9bb265aeda04b3392e135324c we removed Requires=docker.service and left only After=docker.service. In a case where something starts docker.service that's enough, but if docker.service is disabled or no service is dependent on it - it won't be started. This patch adds Wants=docker.service which will try to start docker.service if it is not started or enabled but does not impose a dependency which causes restart of kolla systemd units when docker.service is restarted (see [1]). Closes-Bug: #2065168 [1]: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Wants= Change-Id: Ic3acb15f7c6ba7269ef62ccc8895b6bea4fc1f4d --- ansible/module_utils/kolla_systemd_worker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/module_utils/kolla_systemd_worker.py b/ansible/module_utils/kolla_systemd_worker.py index b40cdb94b3..b807d2a929 100644 --- a/ansible/module_utils/kolla_systemd_worker.py +++ b/ansible/module_utils/kolla_systemd_worker.py @@ -23,6 +23,7 @@ TEMPLATE = '''# ${service_name} [Unit] Description=${engine} ${service_name} After=${deps} +Wants=${deps} StartLimitInterval=${restart_timeout} StartLimitBurst=${restart_retries}