Tempest test "tempest.api.network.admin.test_ports.PortsAdminExtendedAttrsTestJSON" fails

Bug #1800115 reported by B ChandraSekhar Reddy on 2018-10-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Undecided
Unassigned

Bug Description

Tempest test "tempest.api.network.admin.test_ports.PortsAdminExtendedAttrsTestJSON" fails

Here is the python log :

('\n', 'PortsAdminExtendedAttrsTestJSON')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: List of Failed tests:
setUpClass (tempest.api.network.admin.test_ports.PortsAdminExtendedAttrsTestJSON)
Reason: _StringException: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tempest/test.py", line 172, in setUpClass
    six.reraise(etype, value, trace)
  File "/usr/lib/python2.7/site-packages/tempest/test.py", line 165, in setUpClass
    cls.resource_setup()
  File "/usr/lib/python2.7/site-packages/tempest/api/network/admin/test_ports.py", line 35, in resource_setup
    cls.host_id = hyper_list['hypervisors'][0]['hypervisor_hostname']
IndexError: list index out of range
`````````````````````````````````````````````````````````````````````````````````````````````

This log conveys like tempest test could not fetch any underlying hypervisor information which negative.

It seems that the tempest does not get the host name from the hypervisor list.
But in nova, there is a value in the hypervisor-list like below.

`````````````````````````````````````````````````````````````````````````````````````````````
(undercloud) [root@undercloud ~]# nova hypervisor-list
+--------------------------------------+--------------------------------------+-------+---------+
| ID | Hypervisor hostname | State | Status |
+--------------------------------------+--------------------------------------+-------+---------+
| b9ea75f4-d742-4335-8400-01b8d6e65614 | d77b8e20-3797-4b37-8ec9-2cf418e99c90 | up | enabled |
+--------------------------------------+--------------------------------------+-------+---------+

Please let us know if any additional information required.

Expected results:
this test should pass without any errors

Hi B ChandraShekhra,

Are you still getting same problem.

I have tried on my system, tests are passing.

stack@control:~/tempest$ sudo python -m testtools.run tempest.api.network.admin.test_ports.PortsAdminExtendedAttrsTestJSON
Tests running...

Ran 4 tests in 23.497s
OK

I have checked, result is coming properly
hyper_list
{u'hypervisors': [{u'status': u'disabled', u'state': u'down', u'id': 1, u'hypervisor_hostname': u'control'}]}

(Pdb) cls.host_id
u'control'

I think there might be some issue with your environment

Can you please share the reproducing steps?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers