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 <gabrioux@redhat.com>
(cherry picked from commit 39bb279a53)
pull/5763/head
Guillaume Abrioux 2020-07-21 20:27:28 +02:00 committed by Dimitri Savineau
parent 66dde0034b
commit e0ad8194db
1 changed files with 1 additions and 1 deletions

View File

@ -10,8 +10,8 @@ After=network.target
[Service] [Service]
{% if container_binary == 'podman' %} {% if container_binary == 'podman' %}
ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-crash-%i
{% endif %} {% endif %}
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-crash-%i
ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-crash-%i \ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-crash-%i \
{% if container_binary == 'podman' %} {% if container_binary == 'podman' %}
-d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \ -d --conmon-pidfile /%t/%n-pid --cidfile /%t/%n-cid \