]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephadm: KillMode=none in unit file
authorSage Weil <sage@redhat.com>
Sun, 9 Feb 2020 00:21:05 +0000 (18:21 -0600)
committerSage Weil <sage@redhat.com>
Sun, 9 Feb 2020 00:21:05 +0000 (18:21 -0600)
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 <sage@redhat.com>
src/cephadm/cephadm

index 92e31d5dfc5d5ead3e8b93cdaa6544b36f5133af..fb0235f6490dbbfeaca1655f15399d7319b1511f 100755 (executable)
@@ -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