Browse code

Create NOVA_READY_TIMEOUT in is_nova_ready function

The function was introduced in [0] using a hardcoded timeout of 60
seconds which turns out to be too small on slow machines. Create a new
global variable NOVA_READY_TIMEOUT instead so that users can
override the timeout if necessary.

[0] I32eb59b9d6c225a3e93992be3a3b9f4b251d7189

Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
Change-Id: I0cd7f193589a1a0776ae76dc30cecefe7ba9e5db

Jens Harbott authored on 2018/02/23 22:56:48
Showing 2 changed files
... ...
@@ -1000,7 +1000,7 @@ function is_nova_ready {
1000 1000
         # because of the dom0/domU split. Just ignore for now.
1001 1001
         return
1002 1002
     fi
1003
-    wait_for_compute 60
1003
+    wait_for_compute $NOVA_READY_TIMEOUT
1004 1004
 }
1005 1005
 
1006 1006
 function start_nova {
... ...
@@ -813,6 +813,9 @@ fi
813 813
 # Service startup timeout
814 814
 SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60}
815 815
 
816
+# Timeout for compute node registration in Nova
817
+NOVA_READY_TIMEOUT=${NOVA_READY_TIMEOUT:-$SERVICE_TIMEOUT}
818
+
816 819
 # Service graceful shutdown timeout
817 820
 SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT=${SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT:-5}
818 821