Detach Volume Ordering Has Bad User Experience

Bug #1309154 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Vish Ishaya

Bug Description

Currently when detaching a volume we do:

1. driver.detach() -> detaches the volume in the hypervisor
2. cinder.detach() -> marks the volume detached in cinder
3. bdm.delete() -> stops the nova side from reporting an attached volume.

This leads to bad UX for two reasons:

a. If the cinder detach fails, the bdm still exists so nova reports a volume attached even when the hypervisor
    has detached it.
b. There is a window where cinder reports the volume available but nova still thinks the attachment exists

I propose we reverse the order of 2. and 3.

This reverses a. so that a detach fail will show the volume as attached in cinder but nova will not show it. The nova side more accurately reflects what nova knows about.
This reverses b. so that there is a window where nova has removed the attachment but cinder still reports it in use. This is a fairly minor difference, but leads to a nicer experience when you are detaching and re-attaching the same volume because it can be reattached once it becomes available.

This also may help with https://bugs.launchpad.net/nova/+bug/1172695

Changed in nova:
importance: Undecided → Low
assignee: nobody → Vish Ishaya (vishvananda)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/88416
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=94a3b83f9f1fd52a78b9d49b32ddfae40182f852
Submitter: Jenkins
Branch: master

commit 94a3b83f9f1fd52a78b9d49b32ddfae40182f852
Author: Vishvananda Ishaya <email address hidden>
Date: Thu Apr 17 12:45:25 2014 -0700

    Reverse order of cinder.detach() and bdm.delete()

    The user experience for detaching a volume is better if the bdm
    is destroyed as soon as the driver has detached the volume instead
    of waiting until after we have updated cinder.

    Change-Id: I6f3de25f7737db270af4ba41d7451ae95f3950f5
    Closes-Bug: #1309154

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
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.