Do not disable inspector periodic tasks if [inspector]enabled is False

Our help strings claim that [inspector]enabled only affects classic drivers.
However, it also disables the inspector periodic tasks, if not set to True.

Change-Id: I2e3deaffa31259793f738dc77af49d5cb57af697
Story: #2002730
Task: #22579
This commit is contained in:
Dmitry Tantsur 2018-06-27 16:02:23 +02:00
parent a75680b834
commit 2e568bdd56
3 changed files with 10 additions and 4 deletions

View File

@ -140,8 +140,7 @@ class Inspector(base.InspectInterface):
'ironic-inspector', {'uuid': node_uuid}) 'ironic-inspector', {'uuid': node_uuid})
_get_client(task.context).abort(node_uuid) _get_client(task.context).abort(node_uuid)
@periodics.periodic(spacing=CONF.inspector.status_check_period, @periodics.periodic(spacing=CONF.inspector.status_check_period)
enabled=CONF.inspector.enabled)
def _periodic_check_result(self, manager, context): def _periodic_check_result(self, manager, context):
"""Periodic task checking results of inspection.""" """Periodic task checking results of inspection."""
filters = {'provision_state': states.INSPECTWAIT} filters = {'provision_state': states.INSPECTWAIT}

View File

@ -70,8 +70,7 @@ class OneViewInspect(inspector.Inspector):
) )
return super(OneViewInspect, self).inspect_hardware(task) return super(OneViewInspect, self).inspect_hardware(task)
@periodics.periodic(spacing=CONF.inspector.status_check_period, @periodics.periodic(spacing=CONF.inspector.status_check_period)
enabled=CONF.inspector.enabled)
def _periodic_check_result(self, manager, context): def _periodic_check_result(self, manager, context):
filters = {'provision_state': states.INSPECTWAIT, filters = {'provision_state': states.INSPECTWAIT,
'driver': 'oneview'} 'driver': 'oneview'}

View File

@ -0,0 +1,8 @@
---
fixes:
- |
The periodic tasks for the ``inspector`` inspect interface are no longer
disabled if the ``[inspector]enabled`` option is not set to ``True``.
The help string of this option claims that it does not apply to hardware
types. In any case, the periodic tasks are only run if any enabled
classic driver or hardware interface requires them.