Volume test_volume_transfers.py doesn't clean up awaiting-transfer volumes

Bug #1268481 reported by Gong Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Vishakha Agarwal

Bug Description

Currently test_volume_transfers.py will fail in RHEL64 environment due to https://bugs.launchpad.net/tempest/+bug/1256187, so some volumes in status awaiting-transfer are left and not cleaned up. However, volumes in any status should be cleaned up at the end of the test cases.

[root@localhost volume]# cinder list
+--------------------------------------+-------------------+---------------------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-------------------+---------------------------+------+-------------+----------+-------------+
| 00656a32-abe0-4312-b589-ce5b0f6b66e3 | awaiting-transfer | Volume-tempest-434749063 | 1 | None | false | |
| 06e31627-6f5a-45ee-9a97-1ad3ef9d87e8 | awaiting-transfer | Volume-tempest-458678508 | 1 | None | false | |

Tags: volumes
Changed in tempest:
status: New → Confirmed
Rushi Agrawal (rushiagr)
tags: added: volumes
David Liu (lzbj)
Changed in tempest:
assignee: nobody → david liu (lzbj)
Revision history for this message
chandan kumar (chkumar246) wrote :

Unassigning this bug as there is no activity from last 6 months. If you are still want to work on this bug, feel free to assign yourself.

Changed in tempest:
assignee: David Liu (lzbj) → nobody
Changed in tempest:
assignee: nobody → Vishakha Agarwal (vishakha.agarwal)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master
Review: https://review.openstack.org/570155

Changed in tempest:
status: Confirmed → In Progress
Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

yes, test_volume_transfers is not cleaning up the created volumes if something wrong happen between create_volume_transfer()[1] call and accept_volume_transfer()[2] call then volume stay in 'awaiting-transfer' state and addCleanup[3] of delete_volume will not be able to delete the volume which are in 'awaiting-transfer' state.

We need to add the delete_volume_transfer() as addCleanup just after the create_volume_transfer() call and this should be added with test_utils.call_and_ignore_notfound_exc() to ignore the already deleted or accepted transfer.

This needs to be done in both of the tests in test_volume_transfers.py

..1 https://github.com/openstack/tempest/blob/ab3c306b6016cf95b60d64fe2bfe330d9a427719/tempest/api/volume/test_volume_transfers.py#L43

..2 https://github.com/openstack/tempest/blob/ab3c306b6016cf95b60d64fe2bfe330d9a427719/tempest/api/volume/test_volume_transfers.py#L60

..3 https://github.com/openstack/tempest/blob/ab3c306b6016cf95b60d64fe2bfe330d9a427719/tempest/api/volume/test_volume_transfers.py#L38

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

Reviewed: https://review.openstack.org/570155
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=33173700fae2fbf98f4f91d4547d7b2079e42a77
Submitter: Zuul
Branch: master

commit 33173700fae2fbf98f4f91d4547d7b2079e42a77
Author: Vishakha Agarwal <email address hidden>
Date: Wed May 23 09:45:05 2018 +0000

    To cleanup the awaiting-state volume

    For deleting all volumes which is in 'awaiting
    -state' cleaning the volume transfer after creation
    and acceptance.

    Change-Id: Ib361289ac0111d92cc42ee2b686809906d58c830
    Closes-Bug: #1268481

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

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