From 7159b4ba5956c0fd3141fe13ac40057364683c9c Mon Sep 17 00:00:00 2001 From: Marian Horban Date: Thu, 22 Oct 2015 15:47:49 -0400 Subject: [PATCH] Config graceful_shutdown_timeout option for services To avoid hanging services during gracefull shutdown option graceful_shutdown_timeout should be configured. Closes-Bug: #1446583 Change-Id: I2b7f0df831d65c55ae8cae241478f49c9641d99f --- lib/cinder | 2 +- lib/glance | 2 ++ lib/nova | 1 + stackrc | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/cinder b/lib/cinder index ed9a1038d6..a916c6540f 100644 --- a/lib/cinder +++ b/lib/cinder @@ -357,7 +357,7 @@ function configure_cinder { iniset $CINDER_CONF DEFAULT os_privileged_user_name nova iniset $CINDER_CONF DEFAULT os_privileged_user_password "$SERVICE_PASSWORD" iniset $CINDER_CONF DEFAULT os_privileged_user_tenant "$SERVICE_TENANT_NAME" - + iniset $CINDER_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT" } # create_cinder_accounts() - Set up common required cinder accounts diff --git a/lib/glance b/lib/glance index 2eb93a46e6..5a1b2834d0 100644 --- a/lib/glance +++ b/lib/glance @@ -115,6 +115,7 @@ function configure_glance { configure_auth_token_middleware $GLANCE_REGISTRY_CONF glance $GLANCE_AUTH_CACHE_DIR/registry iniset $GLANCE_REGISTRY_CONF DEFAULT notification_driver messaging iniset_rpc_backend glance $GLANCE_REGISTRY_CONF + iniset $GLANCE_REGISTRY_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT" cp $GLANCE_DIR/etc/glance-api.conf $GLANCE_API_CONF iniset $GLANCE_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL @@ -149,6 +150,7 @@ function configure_glance { iniset $GLANCE_API_CONF glance_store swift_store_config_file $GLANCE_SWIFT_STORE_CONF iniset $GLANCE_API_CONF glance_store default_swift_reference ref1 iniset $GLANCE_API_CONF glance_store stores "file, http, swift" + iniset $GLANCE_API_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT" iniset $GLANCE_SWIFT_STORE_CONF ref1 user $SERVICE_TENANT_NAME:glance-swift iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD diff --git a/lib/nova b/lib/nova index 6c414030ae..cce598d853 100644 --- a/lib/nova +++ b/lib/nova @@ -649,6 +649,7 @@ function create_nova_conf { iniset $NOVA_CONF serial_console serialproxy_host "$NOVA_SERVICE_LISTEN_ADDRESS" iniset $NOVA_CONF serial_console enabled True fi + iniset $NOVA_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT" } function init_nova_cells { diff --git a/stackrc b/stackrc index 819aa0125c..1a95e2b7ed 100644 --- a/stackrc +++ b/stackrc @@ -669,6 +669,9 @@ fi # Service startup timeout SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60} +# Service graceful shutdown timeout +SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT=${SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT:-5} + # Support alternative yum -- in future Fedora 'dnf' will become the # only supported installer, but for now 'yum' and 'dnf' are both # available in parallel with compatible CLIs. Allow manual switching