diff options
author | Zuul <zuul@review.opendev.org> | 2020-06-05 12:05:23 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-06-05 12:05:23 +0000 |
commit | 436bf9cc7b2f79ed7730866c55a5c9702e4db5fd (patch) | |
tree | ef6c8296ad0066c5f53e3f1cb39652387b6c28f8 /ironic | |
parent | 1fbc3a55c875092a998b9381d4e09311295b1afa (diff) | |
parent | f464e78efeebcb4489b673658d434162bb7c8484 (diff) | |
download | ironic-436bf9cc7b2f79ed7730866c55a5c9702e4db5fd.tar.gz |
Merge "If the "[conductor]XXX_timeout" is less than 0,disable periodic task"
Diffstat (limited to 'ironic')
-rw-r--r-- | ironic/conductor/manager.py | 12 | ||||
-rw-r--r-- | ironic/conf/conductor.py | 3 |
2 files changed, 6 insertions, 9 deletions
diff --git a/ironic/conductor/manager.py b/ironic/conductor/manager.py index bcb28f5c9..b96033641 100644 --- a/ironic/conductor/manager.py +++ b/ironic/conductor/manager.py @@ -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, diff --git a/ironic/conf/conductor.py b/ironic/conf/conductor.py index 63c607e3b..494317f8d 100644 --- a/ironic/conf/conductor.py +++ b/ironic/conf/conductor.py @@ -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 ' |