From cd22a1b38c4b455eb39c90ca41b5bc038c1329f6 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Wed, 27 Nov 2019 10:20:54 +0100 Subject: [PATCH] mirrorlist: use KillMode=none If stopping of the mirrorlist container fails, systemd usually kills all processes in the same control group which means that the usual Podman cleanup steps will not be able to run. Setting KillMode=none gives Podman a chance to correctly remove the container. Signed-off-by: Adrian Reber --- .../mirrorlist_proxy/templates/mirrorlist.service.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/mirrormanager/mirrorlist_proxy/templates/mirrorlist.service.j2 b/roles/mirrormanager/mirrorlist_proxy/templates/mirrorlist.service.j2 index ae2ed8c1c8..fff8ca997a 100644 --- a/roles/mirrormanager/mirrorlist_proxy/templates/mirrorlist.service.j2 +++ b/roles/mirrormanager/mirrorlist_proxy/templates/mirrorlist.service.j2 @@ -3,7 +3,7 @@ Description=Mirrorlist Container {{ item }} [Service] User=mirrormanager -ExecStartPre=-/usr/bin/podman stop %n +ExecStartPre=-/usr/bin/podman stop -t 1 %n ExecStartPre=-/usr/bin/podman rm %n --force ExecStart=/usr/bin/podman run \ --rm=true \ @@ -20,7 +20,8 @@ ExecStart=/usr/bin/podman run \ --port 1808{{ item }} \ --listen 127.0.0.1 \ -l /var/log/mirrormanager/%n.log -ExecStop=/usr/bin/podman stop %n +ExecStop=/usr/bin/podman stop -t 1 %n +KillMode=none [Install] WantedBy=multi-user.target