From: Dimitri Savineau Date: Wed, 13 Jan 2021 15:17:56 +0000 (-0500) Subject: ceph-mon: add ExecStartPre docker stop to systemd X-Git-Tag: v5.0.4~18 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa9177d2ce9d6259b3ce548f8bc71e4c4a009589;p=ceph-ansible.git ceph-mon: add ExecStartPre docker stop to systemd We already do that in the other systemd templates (mgr, mds, etc..) and would present to add workaround in other orchestration tool. This change is for containerized deployment only. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1882724 Signed-off-by: Dimitri Savineau (cherry picked from commit 3749d297c77e65406ddec08e7bae5cea097905d8) --- diff --git a/roles/ceph-mon/templates/ceph-mon.service.j2 b/roles/ceph-mon/templates/ceph-mon.service.j2 index a0f47786e..ef8c84668 100644 --- a/roles/ceph-mon/templates/ceph-mon.service.j2 +++ b/roles/ceph-mon/templates/ceph-mon.service.j2 @@ -12,6 +12,8 @@ EnvironmentFile=-/etc/environment {% if container_binary == 'podman' %} ExecStartPre=-/usr/bin/rm -f /%t/%n-pid /%t/%n-cid ExecStartPre=-/usr/bin/{{ container_binary }} rm --storage ceph-mon-%i +{% else %} +ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-mon-%i {% endif %} ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-mon-%i ExecStartPre=/bin/sh -c '"$(command -v mkdir)" -p /etc/ceph /var/lib/ceph/mon'