remove arm-ubc-01 reference
[mirror/dsa-puppet.git] / modules / ganeti2 / files / ganeti-reboot-cluster
index 2e2a2ab..bc95de3 100755 (executable)
@@ -109,7 +109,7 @@ reboot_host() {
   echo "[$(date)] $tgt is up.  Pausing for $sleep_time seconds"
   sleep "$sleep_time"
 
-  max_wait='15 minutes'
+  max_wait='180 minutes'
   wait_until=$(date -d "now +$max_wait" +%s)
   while ! ssh -n -l root "$tgt" systemctl is-system-running; do
     echo "[$(date)] $tgt is still booting up (will wait until $(date -d "@$wait_until")."
@@ -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 || ! /usr/lib/nagios/plugins/dsa-check-drbd -d All ; 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."