Merge "If the "[conductor]XXX_timeout" is less than 0,disable periodic task"
This commit is contained in:
commit
436bf9cc7b
@ -1599,7 +1599,7 @@ class ConductorManager(base_manager.BaseConductorManager):
|
||||
@periodics.periodic(
|
||||
spacing=CONF.conductor.check_provision_state_interval,
|
||||
enabled=CONF.conductor.check_provision_state_interval > 0
|
||||
and CONF.conductor.deploy_callback_timeout != 0)
|
||||
and CONF.conductor.deploy_callback_timeout > 0)
|
||||
def _check_deploy_timeouts(self, context):
|
||||
"""Periodically checks whether a deploy RPC call has timed out.
|
||||
|
||||
@ -1607,8 +1607,6 @@ class ConductorManager(base_manager.BaseConductorManager):
|
||||
|
||||
:param context: request context.
|
||||
"""
|
||||
# FIXME(rloo): If the value is < 0, it will be enabled. That doesn't
|
||||
# seem right.
|
||||
callback_timeout = CONF.conductor.deploy_callback_timeout
|
||||
|
||||
filters = {'reserved': False,
|
||||
@ -1821,7 +1819,7 @@ class ConductorManager(base_manager.BaseConductorManager):
|
||||
@periodics.periodic(
|
||||
spacing=CONF.conductor.check_provision_state_interval,
|
||||
enabled=CONF.conductor.check_provision_state_interval > 0
|
||||
and CONF.conductor.clean_callback_timeout != 0)
|
||||
and CONF.conductor.clean_callback_timeout > 0)
|
||||
def _check_cleanwait_timeouts(self, context):
|
||||
"""Periodically checks for nodes being cleaned.
|
||||
|
||||
@ -1830,8 +1828,6 @@ class ConductorManager(base_manager.BaseConductorManager):
|
||||
|
||||
:param context: request context.
|
||||
"""
|
||||
# FIXME(rloo): If the value is < 0, it will be enabled. That doesn't
|
||||
# seem right.
|
||||
callback_timeout = CONF.conductor.clean_callback_timeout
|
||||
|
||||
filters = {'reserved': False,
|
||||
@ -2982,15 +2978,13 @@ class ConductorManager(base_manager.BaseConductorManager):
|
||||
@periodics.periodic(
|
||||
spacing=CONF.conductor.check_provision_state_interval,
|
||||
enabled=CONF.conductor.check_provision_state_interval > 0
|
||||
and CONF.conductor.inspect_wait_timeout != 0)
|
||||
and CONF.conductor.inspect_wait_timeout > 0)
|
||||
def _check_inspect_wait_timeouts(self, context):
|
||||
"""Periodically checks inspect_wait_timeout and fails upon reaching it.
|
||||
|
||||
:param context: request context
|
||||
|
||||
"""
|
||||
# FIXME(rloo): If the value is < 0, it will be enabled. That doesn't
|
||||
# seem right.
|
||||
callback_timeout = CONF.conductor.inspect_wait_timeout
|
||||
|
||||
filters = {'reserved': False,
|
||||
|
@ -60,6 +60,7 @@ opts = [
|
||||
'in seconds. Set to 0 to disable checks.')),
|
||||
cfg.IntOpt('deploy_callback_timeout',
|
||||
default=1800,
|
||||
min=0,
|
||||
help=_('Timeout (seconds) to wait for a callback from '
|
||||
'a deploy ramdisk. Set to 0 to disable timeout.')),
|
||||
cfg.BoolOpt('force_power_state_during_sync',
|
||||
@ -149,6 +150,7 @@ opts = [
|
||||
'configdrive_use_object_store is True.')),
|
||||
cfg.IntOpt('inspect_wait_timeout',
|
||||
default=1800,
|
||||
min=0,
|
||||
help=_('Timeout (seconds) for waiting for node inspection. '
|
||||
'0 - unlimited.')),
|
||||
cfg.BoolOpt('automated_clean',
|
||||
@ -184,6 +186,7 @@ opts = [
|
||||
'maintenance will make the process continue.')),
|
||||
cfg.IntOpt('clean_callback_timeout',
|
||||
default=1800,
|
||||
min=0,
|
||||
help=_('Timeout (seconds) to wait for a callback from the '
|
||||
'ramdisk doing the cleaning. If the timeout is reached '
|
||||
'the node will be put in the "clean failed" provision '
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes periodic task initialization options to prevent a negative number.
|
||||
|
||||
If "[conductor]clean_callback_timeout","[conductor]inspect_wait_timeout"
|
||||
and "[conductor]inspect_wait_timeout" are a negative value will cause an
|
||||
error on start up from now on.
|
Loading…
Reference in New Issue
Block a user