From: Sage Weil Date: Mon, 16 Dec 2019 21:55:51 +0000 (-0600) Subject: cephadm: do not force container removal on unit stop X-Git-Tag: v15.1.0~456^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26f9fe54cb635cbcd8f74849d6fa3528cdf5d755;p=ceph.git cephadm: do not force container removal on unit stop The -f arg for 'podman rm' will remove the container without actually stopping it, leaving the running containers and processes (conmon and daemon) running and generally making a mess of things. Doing 'podman rm' without the -f on a running container will complain that the container is still running. So, first stop, then remove. Fixes: f1de7060762d31e567a277c02b0d8d533fbb4661 Signed-off-by: Sage Weil --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 9fea0b3add0..0f727af1bbe 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -1042,7 +1042,8 @@ EnvironmentFile=-/etc/environment ExecStartPre=-{container_path} rm ceph-{fsid}-%i 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} rm -f ceph-{fsid}-%i +ExecStop=-{container_path} stop ceph-{fsid}-%i +ExecStop=-{container_path} rm ceph-{fsid}-%i ExecStopPost=-/bin/bash {data_dir}/{fsid}/%i/unit.poststop Restart=on-failure RestartSec=10s