Add force detach volume to nova
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
- Status:
- Started
- Approver:
- John Garbutt
- Priority:
- Medium
- Drafter:
- wanghao
- Direction:
- Needs approval
- Assignee:
- Andrea Rosa
- Definition:
- Pending Approval
- Series goal:
- None
- Implementation:
- Blocked
- Milestone target:
- None
- Started by
- John Garbutt
- Completed by
Related branches
Related bugs
Bug #1449221: Nova doesn't allow cleanup of volumes stuck in 'attaching' or 'detaching' status | Confirmed |
Sprints
Whiteboard
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: https:/
Addressed by: https:/
add force detach to nova
Spec review is stalled, un-targeting blueprint from Juno-1 --johnthetubaguy (28th May 2014)
Gerrit topic: https:/
Addressed by: https:/
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:
https:/
Pending patches
=============
https:/
Moving this to blocked, due to discussions here:
http://
And the uncovering of this:
https:/
moved to newton --johnthetubaguy 2nd march 2016
Work Items
Work items:
Code: INPROGRESS