diff --git a/ironic_python_agent/inspector.py b/ironic_python_agent/inspector.py index 766ce2baa..bcd544892 100644 --- a/ironic_python_agent/inspector.py +++ b/ironic_python_agent/inspector.py @@ -42,13 +42,14 @@ _COLLECTOR_NS = 'ironic_python_agent.inspector.collectors' _NO_LOGGING_FIELDS = ('logs',) +def _extension_manager_err_callback(names): + raise errors.InspectionError('Failed to load collector %s' % names) + + def extension_manager(names): - try: - return stevedore.NamedExtensionManager(_COLLECTOR_NS, - names=names, - name_order=True) - except KeyError as exc: - raise errors.InspectionError('Failed to load collector %s' % exc) + return stevedore.NamedExtensionManager( + _COLLECTOR_NS, names=names, name_order=True, + on_missing_entrypoints_callback=_extension_manager_err_callback) def inspect(): diff --git a/requirements.txt b/requirements.txt index c4190975d..182c73bfe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,6 +19,6 @@ pyudev # LGPLv2.1+ requests>=2.10.0 # Apache-2.0 rtslib-fb>=2.1.41 # Apache-2.0 six>=1.9.0 # MIT -stevedore>=1.10.0 # Apache-2.0 +stevedore>=1.16.0 # Apache-2.0 WSME>=0.8 # MIT ironic-lib>=2.0.0 # Apache-2.0