Skip to content

Commit

Permalink
crash: rm container in ExecPreStart even with docker
Browse files Browse the repository at this point in the history
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 39bb279)
  • Loading branch information
guits authored and dsavineau committed Jul 22, 2020
1 parent e6059fd commit c0b32e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/ceph-crash/templates/ceph-crash.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit c0b32e4

Please sign in to comment.