Tempest test test_create_tenant_request_without_token is failed

Bug #1583207 reported by Sofiia Andriichenko
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Status tracked in 10.0.x
10.0.x
Invalid
High
Sofiia Andriichenko
9.x
Confirmed
High
MOS Keystone

Bug Description

Detailed bug description:
tempest.api.identity.admin.v2.test_tenant_negative.TenantsNegativeTestJSON.test_create_tenant_request_without_token
ISO: 9.0 mos iso #368

Configuration:
Settings:
Compute - QEMU.
Network - Neutron with VLAN segmentation.
Storage Backends - LVM
Additional services - Install Ironic, Install Sahara

In tab Settings->Compute check Nova quotas
In tab Settings->OpenStack Services check enable Install Ceilometer and Aodh
In tab Networks->Other check enable Neutron DVR

Nodes: controller, compute, ironic,cinder, Telemetry - MongoDB

Steps to reproduce:
    1. Deploy ISO in configuration see (Detailed bug description)
    2. Navigate to controller node
    3. Install git (use apt-get install git)
    4. Clone script to deploy rally + tempest
       # git clone https://github.com/obutenko/mos-rally-verify.git
    5. Navigate to the https://github.com/obutenko/mos-rally-verify
    6. Execute necessary steps to deploy tempest
    7. Tun test in debug mode
        #rally --debug verify start --regex tempest.api.identity.admin.v2.test_tenant_negative.TenantsNegativeTestJSON.test_create_tenant_request_without_token

Expected results:
Test is passed

Actual result:
Test is Failed
(see comments)

Reproducibility:
See attachment

Workaround:
---

Impact:
---

Description of the environment:
See (Detailed bug description)

Additional information:
Error Message

test failed

Stacktrace

Traceback (most recent call last):
  File "/home/rally/.rally/tempest/for-deployment-35e8396b-b7d0-4d36-9cdc-ea6d560f7043/tempest/api/identity/admin/v2/test_tenant_negative.py", line 106, in test_create_tenant_request_without_token
    tenant_name)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 480, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 493, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: <bound method TenantsClient.create_tenant of <tempest.services.identity.v2.json.tenants_client.TenantsClient object at 0x7f92f2b995d0>> returned {u'tenant': {u'enabled': True, u'description': u'', u'name': u'tempest-tenant-1824214291', u'id': u'373918e5099a45e9bca57ba1bd45f25f'}}

Revision history for this message
Sofiia Andriichenko (sandriichenko) wrote :
Changed in mos:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → MOS Keystone (mos-keystone)
milestone: none → 9.0
description: updated
Revision history for this message
Alexander Makarov (amakarov) wrote :

It's better to fix test logic:
Here: https://github.com/openstack/tempest/blob/master/tempest/api/identity/admin/v2/test_tenant_negative.py#L103

Token gets deleted. Using Fernet token with revocation tree disabled this action has no effect:
token is issued and keystone has no information of it; on validation keystone just checks if the user has roles in project/tenant - and if roles are intact, the token is still valid.

I suggest just removing token issue and deletion as test is named "create_tenant without token" and not "create_tenant with deleted token"

Revision history for this message
Alexander Makarov (amakarov) wrote :
Revision history for this message
Alexander Petrov (apetrov-n) wrote :

The bug is not reproduced on the latest MOS 9.0 ISO.
Need the env where this bug will be reproduced.

Revision history for this message
Sofiia Andriichenko (sandriichenko) wrote :

Can't reproduce on CI and our environment

Revision history for this message
Alexander Petrov (apetrov-n) wrote :

It was reproduced on MOS 9.1 snapshot #294

Revision history for this message
Alexander Petrov (apetrov-n) wrote :

Diagnostic snapshot:
https://drive.google.com/a/mirantis.com/file/d/0BxPLDs6wcpbDeGxtTGZLT2NvWU0/view?usp=sharing

Traceback (most recent call last):
  File "tempest/api/identity/admin/v2/test_tenant_negative.py", line 152, in test_tenant_update_request_without_token
    tenant['id'])
  File "/root/.rally/tempest/for-deployment-4bd342d0-ff64-43ac-b74e-0c2fb1e70444/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 485, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/root/.rally/tempest/for-deployment-4bd342d0-ff64-43ac-b74e-0c2fb1e70444/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: <bound method TenantsClient.update_tenant of <tempest.lib.services.identity.v2.tenants_client.TenantsClient object at 0x7eff28c3f9d0>> returned {u'tenant': {u'id': u'788ca99982494f25acfecf786b0d8138', u'enabled': True, u'description': u'', u'name': u'tempest-tenant-1338384930', u'extra': {}}}

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.