From 8a4a432e8b6e41ff13c33698cc053079f6786aa2 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 13 Apr 2022 10:33:25 +0530 Subject: [PATCH] src/stop.sh: check if ceph-mds daemon(s) exist beforehand qa/tasks/vstart_runner.py runs src/stop.sh and src/vstart.sh if --create is passed to it. Once in a few times, vstart_runner.py hangs on running stop.sh. Running "ps -ef | grep ceph" shows that following command is launched every time vstart_runner.py hangs at stop.sh - /usr/bin/python3.9 bin/ceph -c /build/ceph.conf tell mds.* client ls Every time an instance of vstart_runner.py hangs at execution of stop.sh, a new "ceph tell mds.* client ls" command is launched. This doesn't happen when stop.sh is run manually. I suspect some issue lies between this commmand in stop.sh and Python subprocess module. Anyways, a simple fix is to not to run this command when ceph-mds daemon(s) are not present on the system. Signed-off-by: Rishabh Dave --- src/stop.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/stop.sh b/src/stop.sh index 71bc40986d10..60b6216b6840 100755 --- a/src/stop.sh +++ b/src/stop.sh @@ -104,8 +104,11 @@ do_umountall() { done #Get fuse mounts of the cluster - CEPH_FUSE_MNTS=$("${CEPH_BIN}"/ceph -c $conf_fn tell mds.* client ls 2>/dev/null | grep mount_point | tr -d '",' | awk '{print $2}') - [ -n "$CEPH_FUSE_MNTS" ] && sudo umount -f $CEPH_FUSE_MNTS + num_of_ceph_mdss=$(ps -e | grep \ ceph-mds$ | wc -l) + if test num_of_ceph_mdss -ne 0; then + CEPH_FUSE_MNTS=$("${CEPH_BIN}"/ceph -c $conf_fn tell mds.* client ls 2>/dev/null | grep mount_point | tr -d '",' | awk '{print $2}') + [ -n "$CEPH_FUSE_MNTS" ] && sudo umount -f $CEPH_FUSE_MNTS + fi } usage="usage: $0 [all] [mon] [mds] [osd] [rgw] [nfs] [--crimson] [--cephadm]\n" -- 2.47.3