diff --git a/doc/source/admin/upgrade-guide.rst b/doc/source/admin/upgrade-guide.rst index 8e94976f24..d2acfb80ea 100644 --- a/doc/source/admin/upgrade-guide.rst +++ b/doc/source/admin/upgrade-guide.rst @@ -185,7 +185,7 @@ older code, and start up a service using newer code with minimal impact. Nodes that are being acted upon by an ironic-conductor process, which are not in a stable state, will be put into a failed state when -:oslo.config:option:`DEFAULT.graceful_shutdown_timeout` is reached. Node failures that occur +:oslo.config:option:`conductor.graceful_shutdown_timeout` is reached. Node failures that occur during an upgrade are likely due to timeouts, resulting from delays involving messages being processed and acted upon by a conductor during long running, multi-step processes such as deployment or cleaning. @@ -197,7 +197,7 @@ A drain shutdown is similar to graceful shutdown, differing in the following way * Triggered by sending signal ``SIGUSR2`` to the process instead of ``SIGTERM`` * The timeout for process termination is determined by - :oslo.config:option:`DEFAULT.drain_shutdown_timeout` instead of :oslo.config:option:`DEFAULT.graceful_shutdown_timeout` + :oslo.config:option:`DEFAULT.drain_shutdown_timeout` instead of :oslo.config:option:`conductor.graceful_shutdown_timeout` :oslo.config:option:`DEFAULT.drain_shutdown_timeout` is set long enough so that any node in a not stable state will have time to reach a stable state (complete or failed) before diff --git a/ironic/conductor/rpc_service.py b/ironic/conductor/rpc_service.py index a64c9b0425..1b72a60817 100644 --- a/ironic/conductor/rpc_service.py +++ b/ironic/conductor/rpc_service.py @@ -107,7 +107,7 @@ class RPCService(rpc_service.BaseRPCService): if self.draining: shutdown_timeout = CONF.drain_shutdown_timeout else: - shutdown_timeout = CONF.graceful_shutdown_timeout + shutdown_timeout = CONF.conductor.graceful_shutdown_timeout if shutdown_timeout == 0: # No timeout, run until no nodes are reserved return False diff --git a/ironic/conf/conductor.py b/ironic/conf/conductor.py index 338b5eb27e..dfe67cd8cb 100644 --- a/ironic/conf/conductor.py +++ b/ironic/conf/conductor.py @@ -607,6 +607,14 @@ opts = [ 'here are validated as absolute paths and will be rejected' 'if they contain path traversal mechanisms, such as "..".' )), + cfg.IntOpt('graceful_shutdown_timeout', + deprecated_group='DEFAULT', + deprecated_reason=_( + 'This replaces oslo.service ' + '[DEFAULT]/graceful_shutdown_timeout option.'), + default=60, + help='Specify a timeout after which a gracefully shutdown ' + 'conductor will exit. Zero value means endless wait.'), cfg.DictOpt('bootloader_by_arch', default={}, help=_( diff --git a/releasenotes/notes/conductor-graceful-shutdown-timeout-db26a9194cf27bc2.yaml b/releasenotes/notes/conductor-graceful-shutdown-timeout-db26a9194cf27bc2.yaml new file mode 100644 index 0000000000..53bc54106e --- /dev/null +++ b/releasenotes/notes/conductor-graceful-shutdown-timeout-db26a9194cf27bc2.yaml @@ -0,0 +1,16 @@ +--- +upgrade: + - | + The configuration option `[DEFAULT]/graceful_shutdown_timeout` from + `oslo.service` has been replaced by configuration option + `[conductor]/graceful_shutdown_timeout`. + + The default value (`60` seconds) has not changed, operators using a custom + value for should update their configuration files to use the new option. +deprecations: + - | + The configuration option `[DEFAULT]/graceful_shutdown_timeout` from + `oslo.service` has been deprecated, replaced by + `[conductor]/graceful_shutdown_timeout`. This change was triggered by the + need to remove usage of eventlet. +