Log hook names as we run them
Change-Id: I477b2896dfce0d0e74a0133b8478adbf4dd2097c
This commit is contained in:
parent
b534199d15
commit
2853ec72a4
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue