From 0adb07cb5fb5c115b6fc2ad5686857ca48159b4e Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 21 Aug 2018 22:46:34 +0200 Subject: [PATCH] ganeti-reboot-cluster: wait for drbd to have caught up --- modules/ganeti2/files/ganeti-reboot-cluster | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/ganeti2/files/ganeti-reboot-cluster b/modules/ganeti2/files/ganeti-reboot-cluster index 28f945b3e..383eb7ae1 100755 --- a/modules/ganeti2/files/ganeti-reboot-cluster +++ b/modules/ganeti2/files/ganeti-reboot-cluster @@ -211,6 +211,15 @@ crossmigrate() { fi done + if [ -e /proc/drbd ]; then + echo "Waiting for drbd to be consistent." + sleep 5 + while egrep -C2 --color -i 'iconsistent|finish' /proc/drbd; do + echo "Still waiting.." + sleep 5 + done + fi + echo "Migrating from $me to $them." if ! gnt-node migrate -f -n "$them" "$me"; then echo >&2 "gnt-node migrate exited with an error. Bailing out." -- 2.20.1