Skip to content

Commit d51baee

Browse files
committed
Add NOVA_SHUTDOWN_TIMEOUT variable
This adds a variable to control the [DEFAULT]/shutdown_timeout config in nova to control whether or not a guest should have a graceful shutdown of the OS or if it should just stop immediately (no timeout). Since devstack uses CirrOS images by default, the default value for the NOVA_SHUTDOWN_TIMEOUT variable is 0 which should speed up tempest runs. The default in nova.conf [1] is 60 seconds. [1] https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.shutdown_timeout Change-Id: Ida83f70a1c4e61e5248f2bd42b4c24f7ac6d2310 Related-Bug: #1829896
1 parent 15c64f1 commit d51baee

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/nova

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ ISCSID_DEBUG_LEVEL=${ISCSID_DEBUG_LEVEL:-4}
153153
# Other options include "versioned" and "both".
154154
NOVA_NOTIFICATION_FORMAT=${NOVA_NOTIFICATION_FORMAT:-unversioned}
155155

156+
# Timeout for servers to gracefully shutdown the OS during operations
157+
# like shelve, rescue, stop, rebuild. Defaults to 0 since the default
158+
# image in devstack is CirrOS.
159+
NOVA_SHUTDOWN_TIMEOUT=${NOVA_SHUTDOWN_TIMEOUT:-0}
160+
156161
# Functions
157162
# ---------
158163

@@ -401,6 +406,7 @@ function create_nova_conf {
401406
iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x"
402407
iniset $NOVA_CONF DEFAULT osapi_compute_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
403408
iniset $NOVA_CONF DEFAULT metadata_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
409+
iniset $NOVA_CONF DEFAULT shutdown_timeout $NOVA_SHUTDOWN_TIMEOUT
404410

405411
iniset $NOVA_CONF key_manager backend nova.keymgr.conf_key_mgr.ConfKeyManager
406412

0 commit comments

Comments
 (0)