From 2853ec72a433763451156fc0f811862bec1b147d Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 22 Aug 2016 19:08:05 +0200 Subject: [PATCH] Log hook names as we run them Change-Id: I477b2896dfce0d0e74a0133b8478adbf4dd2097c --- ironic_inspector/process.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ironic_inspector/process.py b/ironic_inspector/process.py index 083fee4..8251c87 100644 --- a/ironic_inspector/process.py +++ b/ironic_inspector/process.py @@ -92,6 +92,11 @@ def _find_node_info(introspection_data, failures): if not_found_hook is None: failures.append(_('Look up error: %s') % exc) return + + LOG.debug('Running node_not_found_hook %s', + CONF.processing.node_not_found_hook, + data=introspection_data) + # NOTE(sambetts): If not_found_hook is not none it means that we were # unable to find the node in the node cache and there is a node not # found hook defined so we should try to send the introspection data @@ -110,6 +115,8 @@ def _find_node_info(introspection_data, failures): def _run_pre_hooks(introspection_data, failures): hooks = plugins_base.processing_hooks_manager() for hook_ext in hooks: + LOG.debug('Running pre-processing hook %s', hook_ext.name, + data=introspection_data) # NOTE(dtantsur): catch exceptions, so that we have changes to update # node introspection status after look up try: @@ -251,6 +258,8 @@ def _run_post_hooks(node_info, introspection_data): hooks = plugins_base.processing_hooks_manager() for hook_ext in hooks: + LOG.debug('Running post-processing hook %s', hook_ext.name, + node_info=node_info, data=introspection_data) hook_ext.obj.before_update(introspection_data, node_info)