From: Kefu Chai Date: Fri, 21 Oct 2022 17:11:31 +0000 (+0800) Subject: stop.sh: call cephadm rm-cluster only if FSID is not empty X-Git-Tag: v18.1.0~964^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=180e4b53224522309a441e188ec27a83d844c1d3;p=ceph-ci.git stop.sh: call cephadm rm-cluster only if FSID is not empty there are chances that there is no cluster running at that moment, so we could have failure messages like [errno 2] RADOS object not found (error connecting to the cluster) usage: cephadm rm-cluster [-h] --fsid FSID [--force] [--keep-logs] [--zap-osds] cephadm rm-cluster: error: argument --fsid: expected one argument in that case, better off not failing this bash function, as this is not a fatal failure. See-also: https://tracker.ceph.com/issues/57834 Signed-off-by: Kefu Chai --- diff --git a/src/stop.sh b/src/stop.sh index dce34b6513f..6cab228ef7b 100755 --- a/src/stop.sh +++ b/src/stop.sh @@ -77,8 +77,10 @@ maybe_kill() { } do_killcephadm() { - FSID=$($CEPH_BIN/ceph -c $conf_fn fsid) - sudo $CEPHADM rm-cluster --fsid $FSID --force + local FSID=$($CEPH_BIN/ceph -c $conf_fn fsid) + if [ -n "$FSID" ]; then + sudo $CEPHADM rm-cluster --fsid $FSID --force + fi } do_umountall() {