Running test_volume_list_with_details with volume microversion 3.59 fails

Bug #1881863 reported by zhufl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Ghanshyam Mann

Bug Description

1. Problem
Running test_volume_list_with_details with volume.min_microversion set to 3.59 in tempest.conf, it fails with:

Traceback (most recent call last):
  File "/tempest/api/volume/test_volumes_list.py", line 152, in test_volume_list_with_details
    self._assert_volumes_in(fetched_list, self.volume_list)
  File "/tempest/api/volume/test_volumes_list.py", line 71, in _assert_volumes_in
    self.fail(raw_msg % ([str_vol(v) for v in missing_vols],
  File "/Python-3.8.1/venv/lib/python3.8/site-packages/unittest2/case.py", line 690, in fail
    raise self.failureException(msg)
AssertionError: Could not find volumes ['8e4c114e-dd7e-4cd6-95a7-9d728fce3cb0:tempest-VolumesListTestJSON-Volume-476794050', 'f4643eac-a19d-4960-a971-5cdb76ab2c74:tempest-VolumesListTestJSON-Volume-1314501431', '742d551d-260b-4f10-a4da-4280e8645f27:tempest-VolumesListTestJSON-Volume-355422161'] in expected list ['8e4c114e-dd7e-4cd6-95a7-9d728fce3cb0:tempest-VolumesListTestJSON-Volume-476794050', 'f4643eac-a19d-4960-a971-5cdb76ab2c74:tempest-VolumesListTestJSON-Volume-1314501431', '742d551d-260b-4f10-a4da-4280e8645f27:tempest-VolumesListTestJSON-Volume-355422161']; fetched ['742d551d-260b-4f10-a4da-4280e8645f27:tempest-VolumesListTestJSON-Volume-355422161', 'f4643eac-a19d-4960-a971-5cdb76ab2c74:tempest-VolumesListTestJSON-Volume-1314501431', '8e4c114e-dd7e-4cd6-95a7-9d728fce3cb0:tempest-VolumesListTestJSON-Volume-476794050']

2.Analysis
After microversion 3.48 service_uuid and shared_targets are added to the body of volume_detail, and microversion is not used in resource_setup for now, so the result of show_volume in resource_setup doesn't contain service_uuid and shared_targets, but the result of list_volume(detail=True) in testcases contains those fields, so the matching fails.

3.Solution
We should create and get volume details in setUp in order to use the same microversion as in testcases till microversion support in resource_setup is fulfilled.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.opendev.org/733066

Changed in tempest:
assignee: nobody → zhufl (zhu-fanglei)
status: New → In Progress
Revision history for this message
Martin Kopec (mkopec) wrote :

any updates?

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :
Changed in tempest:
assignee: zhufl (zhu-fanglei) → Ghanshyam Mann (ghanshyammann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/c/openstack/tempest/+/820932
Committed: https://opendev.org/openstack/tempest/commit/18b45d7285bf9fa866dabe825c02517f5f0a6819
Submitter: "Zuul (22348)"
Branch: master

commit 18b45d7285bf9fa866dabe825c02517f5f0a6819
Author: Ghanshyam Mann <email address hidden>
Date: Tue Dec 7 12:37:29 2021 -0600

    Moving API microversion fixture in resource_setup

    API microversion fixture is used to set the API
    microversion on service client and reset it back
    after test execution. That is done in setUp()
    method and due to that API microversion is not
    set on service client during resource_setup()
    method and any API call will be requested on base
    version.

    To sync the complete test execution of test class
    with requested API microversion, this commit moves
    the API microversion setting in resource_setup()
    method.

    Closes-Bug: #1881863

    Change-Id: Ia4b884a79cc0e50057dd57090737332bd76da37e

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by "Ghanshyam Mann <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tempest/+/733066
Reason: this is fixed in https://review.opendev.org/c/openstack/tempest/+/820932

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 30.0.0

This issue was fixed in the openstack/tempest 30.0.0 release.

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.