Nova doesn't allow cleanup of volumes stuck in 'attaching' or 'detaching' status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
High
|
Unassigned |
Bug Description
Cinder volumes can get stuck in a state of 'attaching' or 'detaching' and they need to be cleaned up or they will be incapable of being used. This is not possible at the moment as Nova doesn't allow any actions on volumes in 'ing' status.
For detaching a volume nova should do 3 things:
1 Detach the volume from the instance
2 inform cinder about the detach
3 delete the record in the nova BDM table
At the moment if 1 fails we do a roll back, if 2 fails we are stuck with a volume in detaching status. Nova shouldn't stop to complete the detach from its side if it gets some errors from cinder.
What we can do is to modify the nova code in order to manage a potential error coming from cinder, log it and go ahead with the deletion of the BDM record, then an operator can try to fix the cinder side calling the appropriate cinder call, like force-delete.
Basically, if there is a BDM record in nova, we allow the user to call the detach volume as many time as he/she likes.
Nova will delete the BDM record only if the call to cinder "terminate_
This bug has been discussed in a spec: https:/
where we agreed that a spec is not required but we consider this change as a bug fix.
Changed in nova: | |
assignee: | nobody → Scott DAngelo (scott-dangelo) |
Changed in nova: | |
assignee: | Scott DAngelo (scott-dangelo) → nobody |
Changed in nova: | |
assignee: | nobody → Andrea Rosa (andrea-rosa-m) |
summary: |
- Nova volume-detach lacks '--force' command for cleanup + Nova doesn't allow to cleanup volumes stuck in 'attaching' or + 'detaching' status |
description: | updated |
Changed in nova: | |
importance: | Undecided → High |
tags: | added: volumes |
Changed in nova: | |
assignee: | Andrea Rosa (andrea-rosa-m) → John Garbutt (johngarbutt) |
Changed in nova: | |
assignee: | John Garbutt (johngarbutt) → Andrea Rosa (andrea-rosa-m) |
Changed in nova: | |
assignee: | Andrea Rosa (andrea-rosa-m) → wanghao (wanghao749) |
Changed in nova: | |
assignee: | wanghao (wanghao749) → Andrea Rosa (andrea-rosa-m) |
Changed in nova: | |
status: | In Progress → Confirmed |
assignee: | Andrea Rosa (andrea-rosa-m) → nobody |
Changed in nova: | |
assignee: | nobody → Tang Chen (tangchen) |
Changed in nova: | |
assignee: | Tang Chen (tangchen) → Nazeema Begum (nazeema123) |
Changed in nova: | |
assignee: | Nazeema Begum (nazeema123) → nobody |
Changed in nova: | |
status: | In Progress → Confirmed |
assignee: | Mike Chen (chenn2) → nobody |
Changed in nova: | |
assignee: | nobody → Maurice Wei (mauricewei) |
Changed in nova: | |
assignee: | Maurice Wei (mauricewei) → nobody |
assignee: | nobody → HanGuangyu (hanguangyu) |
Changed in nova: | |
assignee: | HanGuangyu (hanguangyu) → nobody |
I am wonder if this should be marked as "Wishlist", what do you think?