From 0dcb59ec33466846d1a1f543485d3fc365cc1667 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Mon, 24 Nov 2014 09:00:07 +0100 Subject: [PATCH] labs: sleep in shutdown_controller.sh After building the cluster with the two additional snapshots on the controller VM, we end up with a dying nova-compute service. Sleeping 2+ seconds after booting into compute and before rebooting controller fixes the problem: nova-compute keeps running and its status in nova-manage service list will go to XXX and back to :-) without user intervention. Change-Id: I8ba20c77392b0966d6febfc300790cf1943f2ad5 --- labs/scripts/shutdown_controller.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/labs/scripts/shutdown_controller.sh b/labs/scripts/shutdown_controller.sh index 08627fb1..7d5909a2 100755 --- a/labs/scripts/shutdown_controller.sh +++ b/labs/scripts/shutdown_controller.sh @@ -8,8 +8,22 @@ indicate_current_auto exec_logfile -echo "Shutting down the controller node." +# At this point in the cluster build, we just rebooted the compute VM to take +# a snapshot, and we are about to reboot the controller node for the same +# purpose. +# +# About a minute after we reboot the controller, the status of nova-compute +# (according to nova-manage service list) becomes "XXX". +# +# If we sleep for 2 seconds now, before rebooting the controller, the +# nova-compute service on the compute node will keep running and the status +# will automatically return to ":-)" after some time (may take several +# minutes). If we don't sleep here, the nova-compute service on compute will +# die within a few minutes (needs manual service restart or a compute node +# reboot). +sleep 2 +echo "Shutting down the controller node." ssh \ -o "UserKnownHostsFile /dev/null" \ -o "StrictHostKeyChecking no" \