Bug 1380293 - Ironic tempest tests are not skipped in the overcloud if Ironic is not available
Summary: Ironic tempest tests are not skipped in the overcloud if Ironic is not available
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ironic
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: z3
: 10.0 (Newton)
Assignee: Martin Kopec
QA Contact: mlammon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-29 08:36 UTC by Daniel Mellado
Modified: 2017-06-28 15:37 UTC (History)
7 users (show)

Fixed In Version: openstack-ironic-6.2.2-5.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-28 15:37:57 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 379256 0 None None None 2016-09-29 08:36:20 UTC
OpenStack gerrit 412622 0 None None None 2016-12-21 10:12:16 UTC
Red Hat Product Errata RHBA-2017:1592 0 normal SHIPPED_LIVE openstack-ironic bug fix advisory 2017-06-28 19:13:53 UTC

Description Daniel Mellado 2016-09-29 08:36:21 UTC
Description of problem:

As ironic is installed on the undercloud alongside with tempest, it provides the entry-point for its tests to be discovered. Ironic tempest plugin, though, lacks the ability to be properly skipped from tempest.conf file, which makes the tests to be ran against the overcloud (who lacks ironic support) and then it fails.

Version-Release number of selected component (if applicable):
python-ironic-tests-5.1.2-3.el7ost.noarch

How reproducible:

[stack@undercloud-0  tempest]$ python -m testtools.run ironic_tempest_plugin.tests.api.admin.test_api_discovery.TestApiDiscovery.test_api_versions
Tests running...
======================================================================
ERROR: ironic_tempest_plugin.tests.api.admin.test_api_discovery.TestApiDiscovery.test_api_versions[id-a3c27e94-f56c-42c4-8600-d6790650b9c5]
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ironic_tempest_plugin/tests/api/admin/test_api_discovery.py", line 23, in test_api_versions
    _, descr = self.client.get_api_description()
  File "/usr/lib/python2.7/site-packages/ironic_tempest_plugin/services/baremetal/base.py", line 33, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ironic_tempest_plugin/services/baremetal/base.py", line 185, in get_api_description
    return self._list_request('', permanent=True)
  File "/usr/lib/python2.7/site-packages/ironic_tempest_plugin/services/baremetal/base.py", line 112, in _list_request
    resp, body = self.get(uri)
  File "tempest/lib/common/rest_client.py", line 274, in get
    return self.request('GET', url, extra_headers, headers)
  File "tempest/lib/common/rest_client.py", line 629, in request
    headers=headers, body=body)
  File "tempest/lib/common/rest_client.py", line 522, in _request
    method, url, headers, body, self.filters)
  File "tempest/lib/auth.py", line 140, in auth_request
    filters, method, url, headers, body)
  File "tempest/lib/auth.py", line 213, in _decorate_request
    base_url = self.base_url(filters=filters, auth_data=auth_data)
  File "tempest/lib/auth.py", line 324, in base_url
    (service, region, endpoint_type))
tempest.lib.exceptions.EndpointNotFound: Endpoint not found
Details: service: baremetal, region: RegionOne, endpoint_type: publicURL

Actual results:

The test fails with EndpointNotFound error

Expected results:

The tests to be skipped

Additional info:

Comment 3 Martin Kopec 2017-01-25 13:00:55 UTC
Related patch was merged (external tracker ID: 412622).

Until new rpm of ironic tests is released, as workaround can be used this: 
https://review.openstack.org/#/c/412622/2/ironic_tempest_plugin/tests/api/admin/base.py

Comment 4 Jon Schlueter 2017-03-13 18:31:26 UTC
I think this was included in openstack-ironic-6.2.2-2.el7ost at GA? unless I'm missing something.

Comment 6 Martin Kopec 2017-04-21 10:55:15 UTC
In openstack-ironic-6.2.2-2.el7ost it's failing as well. From version openstack-ironic-6.2.2-3.el7ost it's working as expected.

Comment 9 errata-xmlrpc 2017-06-28 15:37:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1592


Note You need to log in before you can comment on or make changes to this bug.