From: Sage Weil Date: Sun, 9 Feb 2020 00:21:05 +0000 (-0600) Subject: cephadm: KillMode=none in unit file X-Git-Tag: v15.1.1~486^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9f92c971cec17f1516b6e41c8ab8ed714d6a9296;p=ceph.git cephadm: KillMode=none in unit file The unit already has a ExecStop command that runs 'podman|docker stop', so systemd should not *also* try to kill the process or else it may screw up the container state From https://www.redhat.com/sysadmin/podman-shareable-systemd-services "Note: It’s important to set the kill mode to none. Otherwise, systemd will start competing with Podman to stop and kill the container processes. which can lead to various undesired side effects and invalid states." Hopefully-fixes: https://tracker.ceph.com/issues/43883 Signed-off-by: Sage Weil --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 92e31d5dfc5d..fb0235f6490d 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -1415,6 +1415,7 @@ Type=simple ExecStartPre=-{container_path} rm ceph-{fsid}-crash ExecStart={cmd} ExecStop=-{container_path} stop ceph-{fsid}-crash +KillMode=none Restart=always RestartSec=10 StartLimitInterval=10min @@ -1458,6 +1459,7 @@ ExecStartPre=-{install_path} -d -m0770 -o {uid} -g {gid} /var/run/ceph/{fsid} ExecStart=/bin/bash {data_dir}/{fsid}/%i/unit.run ExecStop=-{container_path} stop ceph-{fsid}-%i ExecStopPost=-/bin/bash {data_dir}/{fsid}/%i/unit.poststop +KillMode=none Restart=on-failure RestartSec=10s TimeoutStartSec=120