tempest failed with test_get_and_delete_device_profile

Bug #1922183 reported by Brin Zhang on 2021-04-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cyborg (OpenStack)
High
Wenping Song
Wallaby
Undecided
Unassigned

Bug Description

We want to backport the fast8 test patch[1] to victoria to impove the stable/* branch's stability, but the cyborg-tempest-plugin is failed with device_profile case, more details as below:

[1] https://review.opendev.org/c/openstack/cyborg/+/782134

temporary zuul log: https://fe19825ced86363d9b21-5da8dd525c228407ee4661a46790293d.ssl.cf1.rackcdn.com/782134/3/check/cyborg-tempest/9997266/testr_results.html

ft1.3: cyborg_tempest_plugin.tests.api.test_device_profile.TestDeviceProfileController.test_get_and_delete_device_profiletesttools.testresult.real._StringException: pythonlogging:'': {{{
2021-03-24 10:50:58,921 77157 INFO [tempest.lib.common.rest_client] Request (TestDeviceProfileController:test_get_and_delete_device_profile): 201 POST http://10.209.97.94/accelerator/v2/device_profiles 0.022s
2021-03-24 10:50:58,922 77157 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: b'[{"name": "fpga-num-1-dp1", "groups": [{"resources:FPGA": "1", "trait:CUSTOM_FAKE_DEVICE": "required"}]}]'
    Response - Headers: {'date': 'Wed, 24 Mar 2021 10:50:58 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'vary': 'OpenStack-API-Version', 'openstack-api-minimum-version': '2.0', 'openstack-api-maximum-version': '2.1', 'openstack-api-version': '2.0', 'content-length': '364', 'content-type': 'application/json', 'x-openstack-request-id': 'req-262e3763-b734-4f41-a48f-4797333c6cee', 'connection': 'close', 'status': '201', 'content-location': 'http://10.209.97.94/accelerator/v2/device_profiles'}
        Body: b'{"name": "fpga-num-1-dp1", "description": null, "uuid": "398052aa-7ed7-4cb9-be83-f5735932a10e", "groups": [{"resources:FPGA": "1", "trait:CUSTOM_FAKE_DEVICE": "required"}], "created_at": "2021-03-24 10:50:58+00:00", "updated_at": "None", "links": [{"href": "http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e", "rel": "self"}]}'
2021-03-24 10:50:58,939 77157 INFO [tempest.lib.common.rest_client] Request (TestDeviceProfileController:test_get_and_delete_device_profile): 200 GET http://10.209.97.94/accelerator/v2/device_profiles 0.016s
2021-03-24 10:50:58,939 77157 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'date': 'Wed, 24 Mar 2021 10:50:58 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'vary': 'OpenStack-API-Version', 'openstack-api-minimum-version': '2.0', 'openstack-api-maximum-version': '2.1', 'openstack-api-version': '2.0', 'content-length': '387', 'content-type': 'application/json', 'x-openstack-request-id': 'req-a5c0101c-15b9-44be-b6b1-5970790d3a9a', 'connection': 'close', 'status': '200', 'content-location': 'http://10.209.97.94/accelerator/v2/device_profiles'}
        Body: b'{"device_profiles": [{"name": "fpga-num-1-dp1", "description": null, "uuid": "398052aa-7ed7-4cb9-be83-f5735932a10e", "groups": [{"resources:FPGA": "1", "trait:CUSTOM_FAKE_DEVICE": "required"}], "created_at": "2021-03-24 10:50:59+00:00", "updated_at": "None", "links": [{"href": "http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e", "rel": "self"}]}]}'
2021-03-24 10:50:58,955 77157 INFO [tempest.lib.common.rest_client] Request (TestDeviceProfileController:test_get_and_delete_device_profile): 200 GET http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e 0.015s
2021-03-24 10:50:58,955 77157 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: None
    Response - Headers: {'date': 'Wed, 24 Mar 2021 10:50:58 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'vary': 'OpenStack-API-Version', 'openstack-api-minimum-version': '2.0', 'openstack-api-maximum-version': '2.1', 'openstack-api-version': '2.0', 'content-length': '384', 'content-type': 'application/json', 'x-openstack-request-id': 'req-cb040b3e-0694-4730-99f1-b2acf40baf9e', 'connection': 'close', 'status': '200', 'content-location': 'http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e'}
        Body: b'{"device_profile": {"name": "fpga-num-1-dp1", "description": null, "uuid": "398052aa-7ed7-4cb9-be83-f5735932a10e", "groups": [{"resources:FPGA": "1", "trait:CUSTOM_FAKE_DEVICE": "required"}], "created_at": "2021-03-24 10:50:59+00:00", "updated_at": "None", "links": [{"href": "http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e", "rel": "self"}]}}'
}}}

Traceback (most recent call last):
  File "/opt/stack/tempest/.tox/tempest/lib/python3.8/site-packages/cyborg_tempest_plugin/tests/api/test_device_profile.py", line 53, in test_get_and_delete_device_profile
    self.assertEqual(dp[0]['name'], response['name'])
KeyError: 'name'

Brin Zhang (zhangbailin) on 2021-04-01
Changed in openstack-cyborg:
status: New → Confirmed
description: updated
tags: added: cyborg-tempest-plugin
Wenping Song (wenping1) wrote :

This is because the dp get api return result has been modified[1]

we should add the 'device_profile' key in the return result on the master branch and backport to V and then modify the tempest-plugin test by add 'device_profile' key.

[1] https://review.opendev.org/c/openstack/cyborg/+/751988

Brin Zhang (zhangbailin) wrote :

In 751988 we were changed the GET device profile API's resposne, and it was removed "device_profile" key from the response body, since we support microversion now, and this conforms to the microversion specification [1], so please fix this issue, and backport to stable/wallaby, than to fix this tempest failed error.

Since we were released wallaby, means feature freeze, so this need a spec and need to submit in Xena release.

[1]https://docs.openstack.org/cyborg/latest/contributor/microversions.html#when-do-i-need-a-new-microversion

Changed in openstack-cyborg:
importance: Undecided → High
Brin Zhang (zhangbailin) on 2021-04-02
Changed in openstack-cyborg:
milestone: none → wallaby
milestone: wallaby → none
Brin Zhang (zhangbailin) on 2021-04-02
Changed in openstack-cyborg:
assignee: nobody → Wenping Song (wenping1)
Brin Zhang (zhangbailin) on 2021-04-07
Changed in openstack-cyborg:
status: Confirmed → Fix Released

This issue was fixed in the openstack/cyborg 6.0.0.0rc2 release candidate.

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

Other bug subscribers