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
This commit is contained in:
Michal Nasiadka 2024-09-13 09:30:19 +02:00
parent 753a7e1a12
commit a8d03a261a

View File

@ -23,6 +23,7 @@ TEMPLATE = '''# ${service_name}
[Unit] [Unit]
Description=${engine} ${service_name} Description=${engine} ${service_name}
After=${deps} After=${deps}
Wants=${deps}
StartLimitInterval=${restart_timeout} StartLimitInterval=${restart_timeout}
StartLimitBurst=${restart_retries} StartLimitBurst=${restart_retries}