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:
parent
4764cffd5a
commit
a27b74cdf7
4
lib/ceph
4
lib/ceph
@ -142,8 +142,8 @@ function cleanup_ceph_remote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup_ceph_embedded {
|
function cleanup_ceph_embedded {
|
||||||
sudo pkill -f ceph-mon
|
sudo killall -w -9 ceph-mon
|
||||||
sudo pkill -f ceph-osd
|
sudo killall -w -9 ceph-osd
|
||||||
sudo rm -rf ${CEPH_DATA_DIR}/*/*
|
sudo rm -rf ${CEPH_DATA_DIR}/*/*
|
||||||
if egrep -q ${CEPH_DATA_DIR} /proc/mounts; then
|
if egrep -q ${CEPH_DATA_DIR} /proc/mounts; then
|
||||||
sudo umount ${CEPH_DATA_DIR}
|
sudo umount ${CEPH_DATA_DIR}
|
||||||
|
Loading…
Reference in New Issue
Block a user