volumes_client is_resource_deleted KeyError

Bug #1887980 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Martin Kopec

Bug Description

I saw this error in a cinder-tempest-plugin-lvm-lio-barbican-centos-8 job run on https://review.opendev.org/#/c/741042/ .

tempest.api.volume.test_volumes_backup.VolumesBackupsTest.test_volume_backup_create_get_detailed_list_restore_delete [83.075145s] ... FAILED
2020-07-16 00:08:38.465168 | controller |
2020-07-16 00:08:38.466229 | controller | Captured traceback:
2020-07-16 00:08:38.466555 | controller | ~~~~~~~~~~~~~~~~~~~
2020-07-16 00:08:38.466578 | controller | Traceback (most recent call last):
2020-07-16 00:08:38.466847 | controller |
2020-07-16 00:08:38.466874 | controller | File "/opt/stack/tempest/tempest/api/volume/base.py", line 181, in delete_volume
2020-07-16 00:08:38.466907 | controller | client.wait_for_resource_deletion(volume_id)
2020-07-16 00:08:38.467179 | controller |
2020-07-16 00:08:38.467204 | controller | File "/opt/stack/tempest/tempest/lib/common/rest_client.py", line 904, in wait_for_resource_deletion
2020-07-16 00:08:38.467222 | controller | if self.is_resource_deleted(id):
2020-07-16 00:08:38.467239 | controller |
2020-07-16 00:08:38.467256 | controller | File "/opt/stack/tempest/tempest/lib/services/volume/v3/volumes_client.py", line 222, in is_resource_deleted
2020-07-16 00:08:38.467273 | controller | volume['id'])
2020-07-16 00:08:38.467290 | controller |
2020-07-16 00:08:38.467307 | controller | KeyError: 'id'

From a quick look it looks like this comes from volume['id'] instead of volume['volume']['id'] being used here:

https://opendev.org/openstack/tempest/src/commit/6cb37d68b2cb40cec9dcbb9e26c0649c6e6c877a/tempest/lib/services/volume/v3/volumes_client.py#L222

(Compare to volume["volume"]["status"] on line 219.)

Revision history for this message
Martin Kopec (mkopec) wrote :
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/742836

Changed in tempest:
assignee: nobody → Martin Kopec (mkopec)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/742836
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=14e2a4e421cc81fe278351d55c85b4f4ac953fc1
Submitter: Zuul
Branch: master

commit 14e2a4e421cc81fe278351d55c85b4f4ac953fc1
Author: Martin Kopec <email address hidden>
Date: Fri Jul 24 09:35:38 2020 +0000

    Fix KeyError exc in volumes_client

    is_resource_deleted method of v3 volumes_client was wrongly accessing
    id value of a volume causing KeyError - in case the being deleted
    volume was in error_deleting state.

    Closes-Bug: #1887980
    Change-Id: I6cea9917c248ceaa8b7cd60d0a20a2bf7540d9b9

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 25.0.1

This issue was fixed in the openstack/tempest 25.0.1 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.