From 9f92c971cec17f1516b6e41c8ab8ed714d6a9296 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 8 Feb 2020 18:21:05 -0600 Subject: [PATCH] cephadm: KillMode=none in unit file MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/cephadm/cephadm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 92e31d5dfc5d5..fb0235f6490db 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 -- 2.39.5