From e0ad8194db39569abd2fa39094837a1e85298f90 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 21 Jul 2020 20:27:28 +0200 Subject: [PATCH] crash: rm container in ExecPreStart even with docker We should ensure the container is removed in `ExecPreStart` even when `{{ container_binary }}` is docker. Signed-off-by: Guillaume Abrioux (cherry picked from commit 39bb279a53deaf87053cae4014c7143780016536) --- roles/ceph-crash/templates/ceph-crash.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ceph-crash/templates/ceph-crash.service.j2 b/roles/ceph-crash/templates/ceph-crash.service.j2 index ed06ef077..94db16a3d 100644 --- a/roles/ceph-crash/templates/ceph-crash.service.j2 +++ b/roles/ceph-crash/templates/ceph-crash.service.j2 @@ -10,8 +10,8 @@ After=network.target [Service] {% if container_binary == 'podman' %} ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid -ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-crash-%i {% endif %} +ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-crash-%i ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-crash-%i \ {% if container_binary == 'podman' %} -d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \