Browse code

Allow specification of ironic callback timeout

We need to be able to adjust Ironic's timeout for a node's deployment
callback. The default is much longer than Tempest's server build
timeout, causing Ironic deployment issues to be masked by more generic
server timeouts in the tempest logs. Being able to set this to be
lower than the nova timeout, we'll have Ironic errors that we can
fingerprint.

Change-Id: I7b8eeda504da7ffd64967bbcfa2625acf418f263
Related-bug: #1408067

Adam Gandelman authored on 2015/01/07 05:18:03
Showing 1 changed files
... ...
@@ -42,6 +42,9 @@ IRONIC_CONF_FILE=$IRONIC_CONF_DIR/ironic.conf
42 42
 IRONIC_ROOTWRAP_CONF=$IRONIC_CONF_DIR/rootwrap.conf
43 43
 IRONIC_POLICY_JSON=$IRONIC_CONF_DIR/policy.json
44 44
 
45
+# Deploy callback timeout can be changed from its default (1800), if required.
46
+IRONIC_CALLBACK_TIMEOUT=${IRONIC_CALLBACK_TIMEOUT:-}
47
+
45 48
 # Deploy to hardware platform
46 49
 IRONIC_HW_NODE_CPU=${IRONIC_HW_NODE_CPU:-1}
47 50
 IRONIC_HW_NODE_RAM=${IRONIC_HW_NODE_RAM:-512}
... ...
@@ -300,6 +303,9 @@ function configure_ironic_conductor {
300 300
     iniset $IRONIC_CONF_FILE DEFAULT rootwrap_config $IRONIC_ROOTWRAP_CONF
301 301
     iniset $IRONIC_CONF_FILE DEFAULT enabled_drivers $IRONIC_ENABLED_DRIVERS
302 302
     iniset $IRONIC_CONF_FILE conductor api_url $IRONIC_SERVICE_PROTOCOL://$HOST_IP:$IRONIC_SERVICE_PORT
303
+    if [[ -n "$IRONIC_CALLBACK_TIMEOUT" ]]; then
304
+        iniset $IRONIC_CONF_FILE conductor deploy_callback_timeout $IRONIC_CALLBACK_TIMEOUT
305
+    fi
303 306
     iniset $IRONIC_CONF_FILE pxe tftp_server $IRONIC_TFTPSERVER_IP
304 307
     iniset $IRONIC_CONF_FILE pxe tftp_root $IRONIC_TFTPBOOT_DIR
305 308
     iniset $IRONIC_CONF_FILE pxe tftp_master_path $IRONIC_TFTPBOOT_DIR/master_images