]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-mon: add ExecStartPre docker stop to systemd
authorDimitri Savineau <dsavinea@redhat.com>
Wed, 13 Jan 2021 15:17:56 +0000 (10:17 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 29 Jan 2021 08:03:34 +0000 (09:03 +0100)
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 <dsavinea@redhat.com>
roles/ceph-mon/templates/ceph-mon.service.j2

index ff34da2d29367e8917e6ec9093c5422c01f9857c..e759a76c035e42358f456d7d47d35cf44f5fbe9c 100644 (file)
@@ -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'