0

After resizing an instance, a few volumes attached to it reattached correctly but a number of volumes are now stuck in "attaching" state.

I am unable to detach any volumes to reattach them as they are not in the correct state:

# nova volume-detach d7d22b3c-f7a8-4e3d-9cf4-8588ca3c2b4e b3d7b7f4-e7af-493b-9a47-fabcda03d259
ERROR (BadRequest): 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-57cb42eb-e47a-476a-a9d7-f6234a7fb5ab) (HTTP 400) (Request-ID: req-fa52d6e4-76e0-441c-8c59-c1ea557f1c59)

The openstack volume show command shows no attachments and a status of "attaching".

I came across a similar issue on the redhat kb but unfortunately the solution posted is that this requires database work and that redhat associates should be contacted: https://access.redhat.com/solutions/5277781

How can I resolve this and reattach the volumes?

3 Answers3

0

You can try using the cinder reset-state command:

cinder reset-state --state available --attach-status detached VOLUME
larsks
  • 277,717
  • 41
  • 399
  • 399
0

The issue was resolved by marking entries for the volume as deleted in the block_device_mapping table of the nova db, and the volume_attachments table of the cinder db, re-attaching the volumes with

nova volume-attach <server> <volume>

And turning off and on the server in question.

0

I experienced this issue with Openstack Train version, fixed it by restarted all nodes rabbitmq services.

I guess there was something wrong with message queue.

Victor Lee
  • 2,467
  • 3
  • 19
  • 37