From 2e568bdd56d66de254ef50f189a392601901d182 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 27 Jun 2018 16:02:23 +0200 Subject: [PATCH] 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 --- ironic/drivers/modules/inspector.py | 3 +-- ironic/drivers/modules/oneview/inspect.py | 3 +-- .../notes/inspector-periodics-34449c9d77830b3c.yaml | 8 ++++++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/inspector-periodics-34449c9d77830b3c.yaml diff --git a/ironic/drivers/modules/inspector.py b/ironic/drivers/modules/inspector.py index d39acc06c2..a140396605 100644 --- a/ironic/drivers/modules/inspector.py +++ b/ironic/drivers/modules/inspector.py @@ -140,8 +140,7 @@ class Inspector(base.InspectInterface): 'ironic-inspector', {'uuid': node_uuid}) _get_client(task.context).abort(node_uuid) - @periodics.periodic(spacing=CONF.inspector.status_check_period, - enabled=CONF.inspector.enabled) + @periodics.periodic(spacing=CONF.inspector.status_check_period) def _periodic_check_result(self, manager, context): """Periodic task checking results of inspection.""" filters = {'provision_state': states.INSPECTWAIT} diff --git a/ironic/drivers/modules/oneview/inspect.py b/ironic/drivers/modules/oneview/inspect.py index 54aacf29c1..77812158e2 100644 --- a/ironic/drivers/modules/oneview/inspect.py +++ b/ironic/drivers/modules/oneview/inspect.py @@ -70,8 +70,7 @@ class OneViewInspect(inspector.Inspector): ) return super(OneViewInspect, self).inspect_hardware(task) - @periodics.periodic(spacing=CONF.inspector.status_check_period, - enabled=CONF.inspector.enabled) + @periodics.periodic(spacing=CONF.inspector.status_check_period) def _periodic_check_result(self, manager, context): filters = {'provision_state': states.INSPECTWAIT, 'driver': 'oneview'} diff --git a/releasenotes/notes/inspector-periodics-34449c9d77830b3c.yaml b/releasenotes/notes/inspector-periodics-34449c9d77830b3c.yaml new file mode 100644 index 0000000000..5b54877730 --- /dev/null +++ b/releasenotes/notes/inspector-periodics-34449c9d77830b3c.yaml @@ -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.