Add force detach volume to nova

Registered by wanghao

There is use case: we have two nova components(call them nova A and nova B) and one cinder component. Attach a volume to an instance in nova A and then services of nova A become abnormal. Because the volume also want to be used in nova B, so using cinder api "force detach volume" to free this volume. But when nova A is normal, nova can't detach this volume from instance by using nova api "detach volume" , as nova check the volume state must be "attached".

I think should we add "force detach" function to nova just like "attach" and "detach", because if using force detach volume in cinder, there is still some attach information in nova which can't be cleaned by using nova api "detach".

This will be added to nova-manage:
nova-mange volume force-detach

Blueprint information

John Garbutt
Needs approval
Andrea Rosa
Pending Approval
Series goal:
Milestone target:
Started by
John Garbutt


There is two ways to implement this :

1. add optional "force_detach" parameter in nova detach api, when using it, nova will detach the volume for clean the attach information whether volume status is attached or detached and call force detach api in cinder.

2. create a new api for nova which named "force detach",it's action will be same as above way.

Consider not more complicated api, I prefer the first one to implement this bp.

Any suggestion is great.

Gerrit topic:,topic:bp/add-force-detach-to-nova,n,z

Addressed by:
    add force detach to nova

Spec review is stalled, un-targeting blueprint from Juno-1 --johnthetubaguy (28th May 2014)

Gerrit topic:,topic:bug/1449221,n,z

Addressed by:
    WIP: adding a volume detach_force call

In a nova-meeting we discussed the need to come up with a work around that doesn't involve an API change. Marked as obsolete. --johnthetubaguy 15th July 2015

Re-approving to track the new patch --johnthetubaguy 20151117

Depends on this:

Pending patches

Moving this to blocked, due to discussions here:
And the uncovering of this:

moved to newton --johnthetubaguy 2nd march 2016


Work Items

Work items:

This blueprint contains Public information 
Everyone can see this information.