test_list_servers_by_admin & test_list_servers_by_admin_with_specified_tenant: mismatch error when admin tenant's VM is already spawned

Bug #1542425 reported by Guillaume Chenuet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Invalid
Undecided
Unassigned

Bug Description

I'm fencing a bug when i tried to execute these tests:
- tempest.api.compute.admin.test_servers.ServersAdminTestJSON.test_list_servers_by_admin
- tempest.api.compute.admin.test_servers.ServersAdminTestJSON.test_list_servers_by_admin_with_specified_tenant

If I try to execute these tests when a VM is already spawned by admin tenant, it's failed with this kind of error:

======================================================================
FAIL: tempest.api.compute.admin.test_servers.ServersAdminTestJSON.test_list_servers_by_admin[id-51717b38-bdc1-458b-b636-1cf82d99f62f]
tags: worker-0
----------------------------------------------------------------------
pythonlogging:'': {{{
2016-02-05 18:25:27,430 13603 INFO [tempest_lib.common.rest_client] Request (ServersAdminTestJSON:test_list_servers_by_admin): 200 POST https://ost-ah1.service.example.inet:5000/v2.0/tokens
2016-02-05 18:25:27,430 13603 DEBUG [tempest_lib.common.rest_client] Request - Headers: {}
        Body: None
    Response - Headers: {'status': '200', 'content-length': '4241', 'vary': 'X-Auth-Token', 'connection': 'close', 'date': 'Fri, 05 Feb 2016 17:25:27 GMT', 'content-type': 'application/json', 'x-openstac}
        Body: None
2016-02-05 18:25:28,271 13603 INFO [tempest_lib.common.rest_client] Request (ServersAdminTestJSON:test_list_servers_by_admin): 200 GET https://ost-ah1.service.example.inet:8774/v2/d52c3b27887e46ca8a64b6bs
2016-02-05 18:25:28,271 13603 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'status': '200', 'content-length': '1812', 'content-location': 'https://ost-ah1.service.example.inet:8774/v2/d52c3b27887e46ca8a64b6b58aba732c/servers/detail', 'x-compute-request-id':}
        Body: {"servers": [{"status": "ACTIVE", "updated": "2016-02-03T08:30:54Z", "hostId": "5d4c4292f62bbd43e72374341b38f34c0d1284772d93e92e8049d12a", "OS-EXT-SRV-ATTR:host": "ost-ah1-compute0.localdom}
}}}

Traceback (most recent call last):
  File "/home/stack/tempest/tempest/api/compute/admin/test_servers.py", line 57, in test_list_servers_by_admin
    self.assertEqual([], servers)
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 348, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
    raise mismatch_error
MismatchError: !=:
reference = []
actual = [{u'OS-DCF:diskConfig': u'AUTO',
  u'OS-EXT-AZ:availability_zone': u'nova',
  u'OS-EXT-SRV-ATTR:host': u'ost-ah1-compute0.localdomain',
  u'OS-EXT-SRV-ATTR:hypervisor_hostname': u'ost-ah1-compute0.localdomain',
  u'OS-EXT-SRV-ATTR:instance_name': u'instance-00000743',
  u'OS-EXT-STS:power_state': 1,
  u'OS-EXT-STS:task_state': None,
  u'OS-EXT-STS:vm_state': u'active',
  u'OS-SRV-USG:launched_at': u'2016-02-03T08:30:54.000000',
  u'OS-SRV-USG:terminated_at': None,
  u'accessIPv4': u'',
  u'accessIPv6': u'',
  u'addresses': {u'test_mgmt': [{u'OS-EXT-IPS-MAC:mac_addr': u'fa:16:3e:62:39:33',
                                 u'OS-EXT-IPS:type': u'fixed',
                                 u'addr': u'192.168.0.5',
                                 u'version': 4}]},
  u'config_drive': u'',
  u'created': u'2016-02-03T08:30:42Z',
  u'flavor': {u'id': u'666d382c-4b52-4a4d-aa2a-c08a9a933bfa',
              u'links': [{u'href': u'http://ost-ah1.service.example.inet:8774/d52c3b27887e46ca8a64b6b58aba732c/flavors/666d382c-4b52-4a4d-aa2a-c08a9a933bfa',
                          u'rel': u'bookmark'}]},
  u'hostId': u'5d4c4292f62bbd43e72374341b38f34c0d1284772d93e92e8049d12a',
  u'id': u'080ab8fb-1fe9-4e73-8037-1e3cadb60174',
  u'image': {u'id': u'7fb7217d-117a-4902-a317-e5246047838b',
             u'links': [{u'href': u'http://ost-ah1.service.example.inet:8774/d52c3b27887e46ca8a64b6b58aba732c/images/7fb7217d-117a-4902-a317-e5246047838b',
                         u'rel': u'bookmark'}]},
  u'key_name': None,
  u'links': [{u'href': u'http://ost-ah1.service.exemple.inet:8774/v2/d52c3b27887e46ca8a64b6b58aba732c/servers/080ab8fb-1fe9-4e73-8037-1e3cadb60174',
              u'rel': u'self'},
             {u'href': u'http://ost-ah1.service.example.inet:8774/d52c3b27887e46ca8a64b6b58aba732c/servers/080ab8fb-1fe9-4e73-8037-1e3cadb60174',
              u'rel': u'bookmark'}],
  u'metadata': {},
  u'name': u'test-mtu',
  u'os-extended-volumes:volumes_attached': [],
  u'progress': 0,
  u'security_groups': [{u'name': u'default'}],
  u'status': u'ACTIVE',
  u'tenant_id': u'd52c3b27887e46ca8a64b6b58aba732c',
  u'updated': u'2016-02-03T08:30:54Z',
  u'user_id': u'admin'}]

Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

But if I try without VMs spawned by admin tenant or VMs spawned by an other tenant, it's works:

# source adminrc
# nova boot --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic net-id=94e10ab3-65f4-4bb7-bc9c-be6d703b25a5 vm-admin
# testr run tempest.api.compute.admin.test_servers.ServersAdminTestJSON.test_list_servers_by_admin => FAILED
# nova delete vm-admin
# testr run tempest.api.compute.admin.test_servers.ServersAdminTestJSON.test_list_servers_by_admin => OK

Thanks

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/279109

Changed in tempest:
assignee: nobody → Guillaume Chenuet (gchenuet)
status: New → In Progress
Revision history for this message
Martin Kopec (mkopec) wrote :

More than a year no change, latest patch set is almost more than a year old. I assume this is not an issue anymore and I'm marking it as invalid. Feel free to reopen the bug by providing new information and set the bug status back to ''New''.

Changed in tempest:
assignee: Guillaume Chenuet (gchenuet) → nobody
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by "Ghanshyam <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tempest/+/279109

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.