BaseV2ComputeTest.attach_volume unable to cleanup multiattached volumes

Bug #1858841 reported by Lee Yarwood
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Lee Yarwood

Bug Description

The current implementation of BaseV2ComputeTest.attach_volume adds two cleanup operations when attaching a volume, an initial call to detach followed by a call to waiters.wait_for_volume_resource_status until the volume becomes 'available'.

https://github.com/openstack/tempest/blob/3e42d81b7205078bd167fa8921cc18f11bd68224/tempest/api/compute/base.py#L520-L549

This cannot work when the volume is multiattach enabled and attached to more than one instance. The use of this status waiter needs to be replaced by a waiter tracking specific attachments.

FWIW this noticed while working on the following negative multiattach tempest tests:

Add negative mulitattach volume swap test
https://review.opendev.org/#/c/700201/

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

Related fix proposed to branch: master
Review: https://review.opendev.org/701605

Changed in tempest:
assignee: nobody → Lee Yarwood (lyarwood)
status: New → In Progress
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/701606

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

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

commit c1b2a4a71b98167213fa268e993044a5c9b5ef56
Author: Lee Yarwood <email address hidden>
Date: Wed Jan 8 17:02:49 2020 +0000

    waiters: Add wait_for_volume_attachment_remove

    This change adds a specific waiter for tracking the removal of
    attachments from a volume. This should allow callers to track the
    detaching of multiattached volumes from instances while the volume
    remains in an `in-use` state.

    Related-bug: #1858841
    Change-Id: I85917f683d2bc81fdf3f6d3351bf56fdb649740e

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

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

commit f644baa1832faff5bb5ead94bc01ea437c15f353
Author: Lee Yarwood <email address hidden>
Date: Wed Jan 8 19:03:05 2020 +0000

    compute: Use wait_for_volume_attachment_remove when detaching multiattach volumes

    This change replaces the attach_volume cleanup call to
    wait_for_volume_resource_status with wait_for_volume_attachment_remove
    for multiattach volumes. This newer waiter method being able to handle
    cases where multiattached volumes remain attached and thus marked as
    'in-use' after being detached from another instance.

    Closes-Bug: #1858841
    Change-Id: I4e9d253cad1b797940c2c1f922b66602ba592416

Changed in tempest:
status: In Progress → 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.