Feature to detach volume from a shelved(_offloaded) instance is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Zhenyu Zheng | ||
Queens |
Fix Committed
|
Medium
|
Matt Riedemann | ||
Rocky |
Fix Committed
|
Medium
|
Zhenyu Zheng |
Bug Description
In microversion 2.20 we added the ablility to detach/attach volumes from a shelved(_offloaded) instance:
http://
But after we uses the cinder new attach workflow, this feature is broken, as when we delete the attachment the volume status changed to "reserved" and we cannot detach the volume with this status.
http://
Dec 11 22:20:41 ubuntu <email address hidden>[2919]: INFO cinder.
Dec 11 22:20:41 ubuntu <email address hidden>[2919]: DEBUG cinder.
Dec 11 22:20:41 ubuntu <email address hidden>[2919]: DEBUG cinder.
Dec 11 22:20:41 ubuntu <email address hidden>[2919]: DEBUG cinder.volume.api [req-7f18da0d-
Dec 11 22:20:41 ubuntu <email address hidden>[2919]: DEBUG cinder.volume.api [req-7f18da0d-
Dec 11 22:20:41 ubuntu <email address hidden>[2919]: DEBUG cinder.volume.api [req-7f18da0d-
Dec 11 22:20:42 ubuntu <email address hidden>[2919]: INFO cinder.
And when I call detach volume on this, I got:
{
"badRequest": {
"message": "Invalid volume: Invalid input received: Invalid volume: Unable to detach volume. Volume status must be 'in-use' and attach_status must be 'attached' to detach. (HTTP 400) (Request-ID: req-70a9bdb8-
"code": 400
}
}
description: | updated |
description: | updated |
tags: | added: shelve |
Changed in nova: | |
assignee: | Zhenyu Zheng (zhengzhenyu) → Matt Riedemann (mriedem) |
Changed in nova: | |
assignee: | Matt Riedemann (mriedem) → Zhenyu Zheng (zhengzhenyu) |
I'm pretty sure there is a tempest integration test for the scenario you're describing:
https:/ /github. com/openstack/ tempest/ blob/ce4b7d246e 09b4dfcd7f9ecef 3b2318b010396ac /tempest/ api/compute/ volumes/ test_attach_ volume. py#L162
Specifically test_detach_ volume_ shelved_ or_offload_ server creates a server, shelve offloads it, attaches a volume to the shelved offloaded server, then detaches the volume, and then unshelves the server.
So I'm not sure what you're describing is a break in the existing API?
When you say, "And when I call detach volume on this, I got:" - which API are you specifically referring to? A compute (nova) API or a block-storage (cinder) API?