summaryrefslogtreecommitdiffstats
path: root/src/stop.sh
diff options
context:
space:
mode:
authorKefu Chai <tchaikov@gmail.com>2022-10-21 19:11:31 +0200
committerKefu Chai <tchaikov@gmail.com>2022-10-21 19:24:32 +0200
commit180e4b53224522309a441e188ec27a83d844c1d3 (patch)
tree02ec807ce4d97321ddfdcd1f6772d19029ac6011 /src/stop.sh
parentMerge pull request #48478 from myoungwon/wip-rbm-move-mkfs-cleanup (diff)
downloadceph-180e4b53224522309a441e188ec27a83d844c1d3.tar.xz
ceph-180e4b53224522309a441e188ec27a83d844c1d3.zip
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 <tchaikov@gmail.com>
Diffstat (limited to '')
-rwxr-xr-xsrc/stop.sh6
1 files changed, 4 insertions, 2 deletions
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() {