Stop using oslo.service graceful_shutdown_timeout

Add option in ironic.conf's condutor section:
`[conductor]/graceful_shutdown_timeout`.

Set `deprecated_group=DEFAULT` and add `deprecated_reason`.

Change-Id: I7dcc66802d0dc2baef7a932458ae255bfa0f9514
This commit is contained in:
Harald Jensås
2025-06-25 16:25:31 +02:00
parent 8b9883c6c7
commit c0a83a46a9
4 changed files with 27 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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=_(

View File

@@ -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.