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
| ... | ... |
@@ -153,6 +153,11 @@ ISCSID_DEBUG_LEVEL=${ISCSID_DEBUG_LEVEL:-4}
|
| 153 | 153 |
# Other options include "versioned" and "both". |
| 154 | 154 |
NOVA_NOTIFICATION_FORMAT=${NOVA_NOTIFICATION_FORMAT:-unversioned}
|
| 155 | 155 |
|
| 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 |
+ |
|
| 156 | 161 |
# Functions |
| 157 | 162 |
# --------- |
| 158 | 163 |
|
| ... | ... |
@@ -401,6 +406,7 @@ function create_nova_conf {
|
| 401 | 401 |
iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x"
|
| 402 | 402 |
iniset $NOVA_CONF DEFAULT osapi_compute_listen "$NOVA_SERVICE_LISTEN_ADDRESS" |
| 403 | 403 |
iniset $NOVA_CONF DEFAULT metadata_listen "$NOVA_SERVICE_LISTEN_ADDRESS" |
| 404 |
+ iniset $NOVA_CONF DEFAULT shutdown_timeout $NOVA_SHUTDOWN_TIMEOUT |
|
| 404 | 405 |
|
| 405 | 406 |
iniset $NOVA_CONF key_manager backend nova.keymgr.conf_key_mgr.ConfKeyManager |
| 406 | 407 |
|