Description of problem: Manila tempest tests cannot be run due to invalid import in the test's base class. Version-Release number of selected component (if applicable): openstack-manila-1.0.0-2.el7ost.noarch How reproducible: Steps to Reproduce: 1. Install "openstack-tempest-liberty" rpm 2. Run command "testr list-tests" 3. Traceback should be similar to (http://pastebin.test.redhat.com/336883) Actual results: http://pastebin.test.redhat.com/336883 Expected results: "testr list-tests" command should list all the Manila tempest tests
Any idea when https://bugs.launchpad.net/manila/+bug/1513105 will be fixed in our downstream Manila rpm?
Rohan, I have to sort things out upstream w.r.t. https://bugs.launchpad.net/manila/+bug/1513105 in stable/liberty before we can do the downstream work. There the proposed backport seems not to be needed to run tempest, so we need to investigate the relevant differences between their tempest setup and what one gets with RHOS 8. It may turn out that the proposed backport is not needed if we tweak something else.
Created attachment 1134759 [details] Error running testr list-tests For completeness, the error message mentioned in Description is: running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \ OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \ ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list --- import errors --- Failed to import test module: manila_tempest_tests.tests.api.admin.test_admin_actions Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 445, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 384, in _get_module_from_name __import__(name) File "/usr/lib/python2.7/site-packages/manila_tempest_tests/tests/api/admin/test_admin_actions.py", line 20, in <module> from manila_tempest_tests.tests.api import base File "/usr/lib/python2.7/site-packages/manila_tempest_tests/tests/api/base.py", line 23, in <module> from tempest.common import isolated_creds # noqa ImportError: cannot import name isolated_creds Full log attached.
I am facing this issue with the GA release of OSP 9: [stack@undercloud-1 tempest]$ rpm -q python-manila-tests.noarch python-manila-tests-2.0.0-5.el7ost.noarch [stack@undercloud-1 tempest]$ rpm -q openstack-manila openstack-manila-2.0.0-5.el7ost.noarch [stack@undercloud-1 tempest]$ testr list-tests running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \ OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \ ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list /usr/lib/python2.7/site-packages/tempest_lib/__init__.py:28: DeprecationWarning: tempest-lib is deprecated for future bug-fixes and code changes in favor of tempest. Please change your imports from tempest_lib to tempest.lib DeprecationWarning) --- import errors --- Failed to import test module: manila_tempest_tests.tests.scenario.test_share_basic_ops Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 445, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 384, in _get_module_from_name __import__(name) File "/usr/lib/python2.7/site-packages/manila_tempest_tests/tests/scenario/test_share_basic_ops.py", line 19, in <module> from tempest.lib.common.utils import test_utils ImportError: cannot import name test_utils Non-zero exit code (2) from test listing.
(In reply to Ramon Acedo from comment #15) > I am facing this issue with the GA release of OSP 9: > > [stack@undercloud-1 tempest]$ rpm -q python-manila-tests.noarch > python-manila-tests-2.0.0-5.el7ost.noarch > [stack@undercloud-1 tempest]$ rpm -q openstack-manila > openstack-manila-2.0.0-5.el7ost.noarch > [stack@undercloud-1 tempest]$ testr list-tests > running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ > OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ > OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \ > OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \ > ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} > ${OS_TEST_PATH:-./tempest/test_discover} --list > /usr/lib/python2.7/site-packages/tempest_lib/__init__.py:28: > DeprecationWarning: tempest-lib is deprecated for future bug-fixes and code > changes in favor of tempest. Please change your imports from tempest_lib to > tempest.lib > DeprecationWarning) > --- import errors --- > Failed to import test module: > manila_tempest_tests.tests.scenario.test_share_basic_ops > Traceback (most recent call last): > File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 445, in > _find_test_path > module = self._get_module_from_name(name) > File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 384, in > _get_module_from_name > __import__(name) > File > "/usr/lib/python2.7/site-packages/manila_tempest_tests/tests/scenario/ > test_share_basic_ops.py", line 19, in <module> > from tempest.lib.common.utils import test_utils > ImportError: cannot import name test_utils > Non-zero exit code (2) from test listing. Ramon, you are seeing a different exception than the one in this BZ, though they both pertain to import errors in tempest with manila. You have: > ImportError: cannot import name test_utils whereas this BZ pertains to > ImportError: cannot import name isolated_creds in OSP8. Please file a new BZ for this issue in OSP9 and record its number here. Manila QE has remarked that they are not unfamiliar with this OSP9 issue and we'll update that BZ and begin work on the issue there.
New BZ with the test_utils import error: https://bugzilla.redhat.com/show_bug.cgi?id=1370240
This issue was verified as fixed in https://bugzilla.redhat.com/show_bug.cgi?id=1358065. *** This bug has been marked as a duplicate of bug 1358065 ***