From a27b74cdf74a83ef2d197d026526211d12990228 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Thu, 18 Sep 2014 13:02:55 -0400 Subject: [PATCH] Ceph: wait for services to shutdown during cleanup It can take ceph-osd and ceph-mon a few seconds to complete when they are killed. This races against the umount command in cleaup and can often result in $CEPH_DATA_DIR failing to unmount since it is still in use. Wait for these processes to stop to ensure the mount point is umounted successfully. Change-Id: I1a635e75a68be6b14fbee52ff981b5f5a3a8eb0e --- lib/ceph | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ceph b/lib/ceph index 77b5726df1..a6b8cc8b57 100644 --- a/lib/ceph +++ b/lib/ceph @@ -142,8 +142,8 @@ function cleanup_ceph_remote { } function cleanup_ceph_embedded { - sudo pkill -f ceph-mon - sudo pkill -f ceph-osd + sudo killall -w -9 ceph-mon + sudo killall -w -9 ceph-osd sudo rm -rf ${CEPH_DATA_DIR}/*/* if egrep -q ${CEPH_DATA_DIR} /proc/mounts; then sudo umount ${CEPH_DATA_DIR}