From 26f9fe54cb635cbcd8f74849d6fa3528cdf5d755 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 16 Dec 2019 15:55:51 -0600 Subject: [PATCH] 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 --- src/cephadm/cephadm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.3