Tempest failed to list glare tempest plugin tests

Bug #1718669 reported by chandan kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glare
Fix Released
High
Mike Fedosin

Bug Description

I have tried following steps to perform sanity over glare tempest plugin.

 $ git clone https://github.com/openstack/glare
 $ cd glare and tox -e py27
 $ source .tox/py27/bin/activate
 $ pip install tempest
 $ mkdir /tmp/foobar
 # Create tempest workspace
 $ cd /tmp/foobar
 (py27) [chkumar246@ironman foobar]$ tempest list-plugins
+---------------------+------------------------------------------------+
| Name | EntryPoint |
+---------------------+------------------------------------------------+
| glare_tempest_tests | glare_tempest_plugin.plugin:GlareTempestPlugin |
+---------------------+------------------------------------------------+
(py27) [chkumar246@ironman foobar]$ ls -a
. ..
(py27) [chkumar246@ironman foobar]$ tempest init --debug
2017-09-21 18:45:03.568 13568 INFO tempest [-] Using tempest config file /etc/tempest/tempest.conf
2017-09-21 18:45:03.581 13568 WARNING oslo_config.generator [-] "catalog_type" is missing a help string
(py27) [chkumar246@ironman foobar]$ ls
etc logs tempest_lock
(py27) [chkumar246@ironman foobar]$ ls -a
. .. etc logs tempest_lock .testr.conf .testrepository
(py27) [chkumar246@ironman foobar]$ tempest run -l
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
${PYTHON:-python} -m subunit.run discover -t /tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest /tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/test_discover --list
--- import errors ---
Failed to import test module: glare_tempest_plugin.tests.api.test_blobs
Traceback (most recent call last):
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/tmp/glare/glare_tempest_plugin/tests/api/test_blobs.py", line 20, in <module>
    from glare_tempest_plugin.tests.api import base
  File "/tmp/glare/glare_tempest_plugin/tests/api/base.py", line 17, in <module>
    from glare_tempest_plugin import clients
  File "/tmp/glare/glare_tempest_plugin/clients.py", line 27, in <module>
    class Manager(object):
  File "/tmp/glare/glare_tempest_plugin/clients.py", line 31, in Manager
    'identity_admin')):
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 261, in get_configured_admin_credentials
    identity_version=identity_version, **params)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 305, in get_credentials
    **params)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 644, in get_credentials
    http_timeout=http_timeout)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 265, in __init__
    super(KeystoneAuthProvider, self).__init__(credentials, scope)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 93, in __init__
    raise exceptions.InvalidCredentials(message)
InvalidCredentials: Invalid Credentials
Details: Credentials are: {'username': None, 'project_name': None, 'project_domain_id': None, 'user_domain_id': None, 'tenant_id': None, 'user_domain_name': None, 'domain_name': None, 'tenant_name': None, 'user_id': None, 'project_id': None, 'domain_id': None, 'project_domain_name': None} Password is not defined.

Failed to import test module: glare_tempest_plugin.tests.api.test_list_artifact
Traceback (most recent call last):
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/tmp/glare/glare_tempest_plugin/tests/api/test_list_artifact.py", line 19, in <module>
    from glare_tempest_plugin.tests.api import base
  File "/tmp/glare/glare_tempest_plugin/tests/api/base.py", line 17, in <module>
    from glare_tempest_plugin import clients
  File "/tmp/glare/glare_tempest_plugin/clients.py", line 27, in <module>
    class Manager(object):
  File "/tmp/glare/glare_tempest_plugin/clients.py", line 31, in Manager
    'identity_admin')):
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 261, in get_configured_admin_credentials
    identity_version=identity_version, **params)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 305, in get_credentials
    **params)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 644, in get_credentials
    http_timeout=http_timeout)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 265, in __init__
    super(KeystoneAuthProvider, self).__init__(credentials, scope)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 93, in __init__
    raise exceptions.InvalidCredentials(message)
InvalidCredentials: Invalid Credentials
Details: Credentials are: {'username': None, 'project_name': None, 'project_domain_id': None, 'user_domain_id': None, 'tenant_id': None, 'user_domain_name': None, 'domain_name': None, 'tenant_name': None, 'user_id': None, 'project_id': None, 'domain_id': None, 'project_domain_name': None} Password is not defined.
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/commands/__init__.py", line 143, in execute
    result = self.run()
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/commands/list_tests.py", line 47, in run
    cmd.setUp()
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/testcommand.py", line 234, in setUp
    self.test_ids = self.list_tests()
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/testcommand.py", line 312, in list_tests
    % (run_proc.returncode))

> /tmp/glare/.tox/py27/lib/python2.7/site-packages/testrepository/testcommand.py(312)list_tests()
-> % (run_proc.returncode))
(Pdb) ^C(py27) [chkumar246@ironman foobar]$
(py27) [chkumar246@ironman foobar]$
(py27) [chkumar246@ironman foobar]$ 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} \
${PYTHON:-python} -m subunit.run discover -t /tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest /tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/test_discover --list
--- import errors ---
Failed to import test module: glare_tempest_plugin.tests.api.test_blobs
Traceback (most recent call last):
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/tmp/glare/glare_tempest_plugin/tests/api/test_blobs.py", line 20, in <module>
    from glare_tempest_plugin.tests.api import base
  File "/tmp/glare/glare_tempest_plugin/tests/api/base.py", line 17, in <module>
    from glare_tempest_plugin import clients
  File "/tmp/glare/glare_tempest_plugin/clients.py", line 27, in <module>
    class Manager(object):
  File "/tmp/glare/glare_tempest_plugin/clients.py", line 31, in Manager
    'identity_admin')):
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 261, in get_configured_admin_credentials
    identity_version=identity_version, **params)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 305, in get_credentials
    **params)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 644, in get_credentials
    http_timeout=http_timeout)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 265, in __init__
    super(KeystoneAuthProvider, self).__init__(credentials, scope)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 93, in __init__
    raise exceptions.InvalidCredentials(message)
InvalidCredentials: Invalid Credentials
Details: Credentials are: {'username': None, 'project_name': None, 'project_domain_id': None, 'user_domain_id': None, 'tenant_id': None, 'user_domain_name': None, 'domain_name': None, 'tenant_name': None, 'user_id': None, 'project_id': None, 'domain_id': None, 'project_domain_name': None} Password is not defined.

Failed to import test module: glare_tempest_plugin.tests.api.test_list_artifact
Traceback (most recent call last):
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/tmp/glare/glare_tempest_plugin/tests/api/test_list_artifact.py", line 19, in <module>
    from glare_tempest_plugin.tests.api import base
  File "/tmp/glare/glare_tempest_plugin/tests/api/base.py", line 17, in <module>
    from glare_tempest_plugin import clients
  File "/tmp/glare/glare_tempest_plugin/clients.py", line 27, in <module>
    class Manager(object):
  File "/tmp/glare/glare_tempest_plugin/clients.py", line 31, in Manager
    'identity_admin')):
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 261, in get_configured_admin_credentials
    identity_version=identity_version, **params)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/common/credentials_factory.py", line 305, in get_credentials
    **params)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 644, in get_credentials
    http_timeout=http_timeout)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 265, in __init__
    super(KeystoneAuthProvider, self).__init__(credentials, scope)
  File "/tmp/glare/.tox/py27/lib/python2.7/site-packages/tempest/lib/auth.py", line 93, in __init__
    raise exceptions.InvalidCredentials(message)
InvalidCredentials: Invalid Credentials
Details: Credentials are: {'username': None, 'project_name': None, 'project_domain_id': None, 'user_domain_id': None, 'tenant_id': None, 'user_domain_name': None, 'domain_name': None, 'tenant_name': None, 'user_id': None, 'project_id': None, 'domain_id': None, 'project_domain_name': None} Password is not defined.
Non-zero exit code (2) from test listing.
(py27) [chkumar246@ironman foobar]$

testr list-tests and tempest run -l failed to list glare tempest tests and tox -e py27 is also failing with RuntimeError: No executable found for "strace" command.

One more issue we found that we are copying tempest.conf in gate: https://github.com/openstack/glare/blob/master/glare_tempest_plugin/contrib/post_test_hook.sh#L23

We need to generate tempest.conf in upstream gates itself.

Please have a look.

Mike Fedosin (mfedosin)
Changed in glare:
importance: Undecided → High
assignee: nobody → Mike Fedosin (mfedosin)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glare (master)

Fix proposed to branch: master
Review: https://review.openstack.org/506327

Changed in glare:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glare (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/506343

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glare (master)

Reviewed: https://review.openstack.org/506327
Committed: https://git.openstack.org/cgit/openstack/glare/commit/?id=777fd3993a5fff7d298f692a52520ea9957c5b42
Submitter: Jenkins
Branch: master

commit 777fd3993a5fff7d298f692a52520ea9957c5b42
Author: Mike Fedosin <email address hidden>
Date: Thu Sep 21 21:59:13 2017 +0300

    Fix tempest plugin

    This code fixes importing configured admin credentials,
    adds a help message to 'catalog_type' config parameter
    and removes unused custom tempest.conf

    Change-Id: I60ba1852d3686141132ae11362f51bf65ddfc618
    Closes-bug: #1718669

Changed in glare:
status: In Progress → Fix Released
tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glare (stable/pike)

Reviewed: https://review.openstack.org/506343
Committed: https://git.openstack.org/cgit/openstack/glare/commit/?id=70a559a48a73a5cffa2de7de1a985537c5281c1c
Submitter: Jenkins
Branch: stable/pike

commit 70a559a48a73a5cffa2de7de1a985537c5281c1c
Author: Mike Fedosin <email address hidden>
Date: Thu Sep 21 21:59:13 2017 +0300

    Fix tempest plugin

    This code fixes importing configured admin credentials,
    adds a help message to 'catalog_type' config parameter
    and removes unused custom tempest.conf

    Change-Id: I60ba1852d3686141132ae11362f51bf65ddfc618
    Closes-bug: #1718669

Revision history for this message
Mike Fedosin (mfedosin) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.