Handle exceptions from plugins gracefully
If a tempest plugin is poorly constructed and raises an exception during register_opts this can interfere with the rest of tempest running correctly. This commit makes the tempest plugin handling a bit more defensive so things don't crash if a plugin raises an exception, instead the error is logged and tempest moves on. Change-Id: Ic133eee1cced5ca3c53334d3d30c7b0b043ff789changes/92/232592/2
parent
ba8c22d712
commit
1bc49b951c
|
@ -88,7 +88,11 @@ class TempestTestPluginManager(object):
|
|||
|
||||
def register_plugin_opts(self, conf):
|
||||
for plug in self.ext_plugins:
|
||||
plug.obj.register_opts(conf)
|
||||
try:
|
||||
plug.obj.register_opts(conf)
|
||||
except Exception:
|
||||
LOG.exception('Plugin %s raised an exception trying to run '
|
||||
'register_opts' % plug.name)
|
||||
|
||||
def get_plugin_options_list(self):
|
||||
plugin_options = []
|
||||
|
|
Loading…
Reference in New Issue