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
This commit is contained in:
Eric Harney 2014-09-18 13:02:55 -04:00 committed by Sébastien Han
parent 4764cffd5a
commit a27b74cdf7

View File

@ -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}