plugin loading failure just crash without any useful information

Bug #1583220 reported by Mehdi Abaakouk on 2016-05-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Hi, when a tempest plugin fails to load the backtrace doesn't help at all to known which plugins fail.

$ testr list-tests
${PYTHON:-python} -m discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list
No handlers could be found for logger "tempest.test_discover.plugins"
--- import errors ---
Failed to call load_tests:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/unittest2/", line 136, in loadTestsFromModule
    return load_tests(self, tests, pattern)
  File "tempest/test_discover/", line 27, in load_tests
    ext_plugins = plugins.TempestTestPluginManager()
  File "tempest/lib/common/utils/", line 30, in getinstance
    instances[cls] = cls()
  File "tempest/test_discover/", line 77, in __init__
  File "/usr/lib/python2.7/site-packages/stevedore/", line 93, in __init__
  File "/usr/lib/python2.7/site-packages/stevedore/", line 171, in _load_plugins
    self._on_load_failure_callback(self, ep, err)
  File "tempest/test_discover/", line 82, in failure_hook
    raise err
ImportError: No module named tests.tempest.plugin
Non-zero exit code (2) from test listing.


Mehdi Abaakouk (sileht) on 2016-05-18
description: updated
Matthew Treinish (treinish) wrote :

So this has come up before and I think we need to improve what we output when we raise here. I'm just not sure exactly how and what is needed here. I agree this isn't super helpful for debugging and requires too much reading into the details to figure it out.

Like, in this case it is saying the plugin is misconfigured and trying to import tests.tempest.plugin (from where ever the plugin is running) Like if it is the cinder plugin its trying to import tests/tempest/ from the cinder root which doesn't exist. I'm not sure what we need to also output on the error to make this more clear

Changed in tempest:
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers