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?
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?