Merge "Log exception if stevedore fails to load module"

This commit is contained in:
Jenkins 2015-12-16 08:27:38 +00:00 committed by Gerrit Code Review
commit 855940e6ce
2 changed files with 2 additions and 3 deletions

View File

@ -287,7 +287,7 @@ class AgentManager(service_base.BaseService):
# Extension raising ExtensionLoadError can be ignored,
# and ignore anything we can't import as a safety measure.
if isinstance(exc, plugin_base.ExtensionLoadError):
LOG.error(_("Skip loading extension for %s") % ep.name)
LOG.exception(_("Skip loading extension for %s") % ep.name)
return
if isinstance(exc, ImportError):
LOG.error(_("Failed to import extension for %(name)s: "

View File

@ -99,8 +99,7 @@ class TestManager(base.BaseTestCase):
'power', 'temperature', 'outlet_temperature',
'airflow', 'cups', 'cpu_util', 'mem_util', 'io_util']
calls = [mock.call(err_msg % n) for n in pollster_names]
LOG.error.assert_has_calls(calls=calls,
any_order=True)
LOG.exception.assert_has_calls(calls=calls, any_order=True)
# Skip loading pollster upon ImportError
@mock.patch('ceilometer.ipmi.pollsters.node._Base.__init__',