test_get_volume_absolute_limits fails with no admin credentials

Bug #1671256 reported by Jérôme Villeneuve-Larouche
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
zhufl

Bug Description

On git commit e5f368c3f8247126d38278b4abdcba0eebcc1d79 when running `tempest.api.volume.test_volume_absolute_limits.AbsoluteLimitsV2Tests.test_get_volume_absolute_limits` with use dynamic credentials at false the test fails with:

```
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.
```

I think it happens because `force_tenant_isolation` is set at `True` in the test class even if it isn't flagged as admin only.

Revision history for this message
Luz Cazares (luz-cazares) wrote :

When not using dynamic credentials you have to provide test_accounts_file.
See details here
https://docs.openstack.org/developer/tempest/configuration.html#pre-provisioned-credentials

Changed in tempest:
status: New → Incomplete
Revision history for this message
Jérôme Villeneuve-Larouche (jvlarouche) wrote :

Yes I am using an account file, the problem is around here https://github.com/openstack/tempest/blob/master/tempest/common/credentials_factory.py#L70

As you can see if force_tenant_isolation is set to True, it tries to use Admin credentials. The test isn't run as Admin since in my case I'm only using non-admin users. From what I've seen the admin tests are being skipped since there are no admin account.

Revision history for this message
Jérôme Villeneuve-Larouche (jvlarouche) wrote :
zhufl (zhu-fanglei)
Changed in tempest:
status: Incomplete → In Progress
assignee: nobody → zhufl (zhu-fanglei)
Revision history for this message
Masayuki Igawa (igawa) wrote :
Download full text (3.2 KiB)

This is happening in the periodic job

http://logs.openstack.org/periodic/periodic-tempest-dsvm-neutron-full-non-admin-ubuntu-xenial-master/f02f70a/console.html#_2017-03-11_07_11_02_331932
http://logs.openstack.org/periodic/periodic-tempest-dsvm-neutron-full-non-admin-ubuntu-xenial-master/ee0aa33/console.html#_2017-03-12_07_09_43_274691

-------
http://paste.openstack.org/show/602447/

2017-03-12 07:09:43.274691 | setUpClass (tempest.api.volume.test_volume_absolute_limits.AbsoluteLimitsV2Tests)
2017-03-12 07:09:43.274731 | ---------------------------------------------------------------------------------
2017-03-12 07:09:43.274738 |
2017-03-12 07:09:43.274747 | Captured traceback:
2017-03-12 07:09:43.274756 | ~~~~~~~~~~~~~~~~~~~
2017-03-12 07:09:43.274769 | Traceback (most recent call last):
2017-03-12 07:09:43.274796 | File "tempest/test.py", line 272, in setUpClass
2017-03-12 07:09:43.274810 | six.reraise(etype, value, trace)
2017-03-12 07:09:43.274826 | File "tempest/test.py", line 260, in setUpClass
2017-03-12 07:09:43.274836 | cls.setup_credentials()
2017-03-12 07:09:43.274855 | File "tempest/api/volume/base.py", line 59, in setup_credentials
2017-03-12 07:09:43.274870 | super(BaseVolumeTest, cls).setup_credentials()
2017-03-12 07:09:43.274887 | File "tempest/test.py", line 360, in setup_credentials
2017-03-12 07:09:43.274899 | credential_type=credentials_type)
2017-03-12 07:09:43.274916 | File "tempest/test.py", line 518, in get_client_manager
2017-03-12 07:09:43.274931 | cred_provider = cls._get_credentials_provider()
2017-03-12 07:09:43.274949 | File "tempest/test.py", line 496, in _get_credentials_provider
2017-03-12 07:09:43.274964 | identity_version=cls.get_identity_version())
2017-03-12 07:09:43.274986 | File "tempest/common/credentials_factory.py", line 77, in get_credentials_provider
2017-03-12 07:09:43.275009 | fill_in=True, identity_version=identity_version)
2017-03-12 07:09:43.275033 | File "tempest/common/credentials_factory.py", line 195, in get_configured_admin_credentials
2017-03-12 07:09:43.275052 | identity_version=identity_version, **params)
2017-03-12 07:09:43.275073 | File "tempest/common/credentials_factory.py", line 228, in get_credentials
2017-03-12 07:09:43.275393 | **params)
2017-03-12 07:09:43.275424 | File "tempest/lib/auth.py", line 644, in get_credentials
2017-03-12 07:09:43.275437 | http_timeout=http_timeout)
2017-03-12 07:09:43.275455 | File "tempest/lib/auth.py", line 265, in __init__
2017-03-12 07:09:43.275475 | super(KeystoneAuthProvider, self).__init__(credentials, scope)
2017-03-12 07:09:43.275492 | File "tempest/lib/auth.py", line 93, in __init__
2017-03-12 07:09:43.275508 | raise exceptions.InvalidCredentials(message)
2017-03-12 07:09:43.275528 | tempest.lib.exceptions.InvalidCredentials: Invalid Credentials
2017-03-12 07:09:43.275720 | Details: Credentials are: {'project_name': None, 'tenant_name': None, 'tenant_id': None, 'domain_id': None, 'user_domain_id': None, 'username': None, 'project_domain_id': None, 'project_id'...

Read more...

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

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

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

Reviewed: https://review.openstack.org/444752
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=ebd5e419d70b8515fbe98d1be865dcbb510a9f5f
Submitter: Jenkins
Branch: master

commit ebd5e419d70b8515fbe98d1be865dcbb510a9f5f
Author: zhufl <email address hidden>
Date: Mon Mar 13 16:42:32 2017 +0800

    Skip when force_tenant_isolation=true and no admin credentials

    AbsoluteLimitsTests requires force_tenant_isolation=True,
    and if admin credentials are not present, the testcase will
    fail instead of being skipped.

    This is to let AbsoluteLimitsTests inherit from BaseVolumeAdminTest
    so it can skip if admin credentials are not present.

    Change-Id: Id71a705cf9b1dd0c0d41a2fb45ab77c95430a123
    Closes-Bug: #1671256

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 16.1.0

This issue was fixed in the openstack/tempest 16.1.0 release.

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.