Tempest tests test_auto_allocate_network.AutoAllocateNetworkTest fail with Unsupported API version

Bug #1625207 reported by Anna Babich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Medium
Anna Babich

Bug Description

The bug has been reproduced against env with MOS 9.1, snapshot #261:
[root@nailgun ~]# fuel node
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---+--------+------------------+---------+-------------+-------------------+-----------------+---------------+--------+---------
 3 | ready | Untitled (59:4c) | 1 | 10.109.16.5 | 4a:be:b7:a2:ff:6a | cinder, compute | | 1 | 1
 1 | ready | Untitled (7c:9a) | 1 | 10.109.16.4 | 64:ec:36:4c:7c:9a | controller | | 1 | 1
 2 | ready | Untitled (1b:7c) | 1 | 10.109.16.3 | 64:1b:28:cd:1b:7c | cinder, compute | | 1 | 1
[root@nailgun ~]#

The maximum available API version:
root@node-1:~# nova version-list | awk '/Maximum version/{print $3}'
2.25

The settings in tempest.conf:
[compute]
min_compute_nodes = 2
min_microversion = 2.1
max_microversion = latest
...

When running the tempest.api.compute.admin.test_auto_allocate_network.AutoAllocateNetworkTest.test_server_multi_create_auto_allocate and *.test_server_create_no_allocate tempest tests against described configuration, they fail with tracebacks like:

FAIL: tempest.api.compute.admin.test_auto_allocate_network.AutoAllocateNetworkTest.test_server_multi_create_auto_allocate
Time: 0.033
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "tempest/api/compute/admin/test_auto_allocate_network.py", line 183, in test_server_multi_create_auto_allocate
    min_count=3)
  File "tempest/common/compute.py", line 129, in create_test_server
    **kwargs)
  File "tempest/lib/services/compute/servers_client.py", line 78, in create_server
    resp, body = self.post('servers', post_body)
  File "tempest/lib/common/rest_client.py", line 276, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)
  File "tempest/lib/services/compute/base_compute_client.py", line 48, in request
    method, url, extra_headers, headers, body, chunked)
  File "tempest/lib/common/rest_client.py", line 665, in request
    resp, resp_body)
  File "tempest/lib/common/rest_client.py", line 833, in _error_checker
    resp=resp)
tempest.lib.exceptions.UnexpectedResponseCode: Unexpected response code received
Details: 406

tempest.log:
2016-09-19 11:51:16.401 200 INFO tempest.lib.common.rest_client [req-985d0403-34b3-4fb1-8c78-fa6768444740 ] Request (AutoAllocateNetworkTest:test_server_multi_create_auto_allocate): 406 POST http://10.109.12.3:8774/v2.1/servers 0.030s
2016-09-19 11:51:16.401 200 DEBUG tempest.lib.common.rest_client [req-985d0403-34b3-4fb1-8c78-fa6768444740 ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-OpenStack-Nova-API-Version': '2.37', 'X-Auth-Token': '<omitted>'}
        Body: {"server": {"min_count": 3, "flavorRef": "0e28b496-ef35-4e20-a6d8-92a9585f0bb7", "networks": "auto", "imageRef": "d41fe272-05ee-4e97-b718-5b6ca52ff038", "name": "tempest.common.compute-instance-572218603"}}
    Response - Headers: {'status': '406', 'content-length': '123', 'content-location': 'http://10.109.12.3:8774/v2.1/servers', 'x-compute-request-id': 'req-985d0403-34b3-4fb1-8c78-fa6768444740', 'vary': 'X-OpenStack-Nova-API-Version', 'connection': 'close', 'x-openstack-nova-api-version': '2.37', 'date': 'Mon, 19 Sep 2016 11:51:16 GMT', 'content-type': 'application/json; charset=UTF-8'}
        Body: {"computeFault": {"message": "Version 2.37 is not supported by the API. Minimum is 2.1 and maximum is 2.25.", "code": 406}} _log_request_full tempest/lib/common/rest_client.py:431

Investigation of Tempest configurations and Tempest tests' results against upstream gate jobs (gate-tempest-dsvm-neutron-full-ubuntu-trusty-mitaka etc.) showed that these tests are skipped at the moment with the same reason as they fail here. This skipping is provided by the use of actual maximum API microversion instead of 'latest' parameter in current tempest.conf.
After replacing 'max_microversion = latest' with 'max_microversion = 2.25', the tests were skipped correctly. So, we need to carry actual maximum version of microversion API from Nova to tempest.conf

Tags: tempest
Anna Babich (ababich)
Changed in mos:
importance: Undecided → Medium
Revision history for this message
Oleksiy Butenko (obutenko) wrote :
Changed in mos:
status: New → Fix Committed
Revision history for this message
Anna Babich (ababich) wrote :
Revision history for this message
Oleksiy Butenko (obutenko) wrote :

verified on 9.1 snapshot #294

Changed in mos:
status: Fix Committed → Fix Released
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.