Attaching a volume w/ an invalid (too long) UUID results in HTTP 500.

Bug #1680130 reported by Eric Harney on 2017-04-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Deepak Mourya

Bug Description

There is some validation here, but it doesn't seem to be complete:
$ nova volume-attach ad1f16cc-d859-4f9d-a7b5-12d28d7ac53c 11111111-2222-4f9d-5555-6
ERROR (BadRequest): Invalid input for field/attribute volumeId. Value: 11111111-2222-4f9d-5555-6. u'11111111-2222-4f9d-5555-6' is not a 'uuid' (HTTP 400)

$ nova volume-attach ad1f16cc-d859-4f9d-a7b5-12d28d7ac53c 11111111-2222-4f9d-5555--666666666666

(note the double hyphen)

RemoteError: Remote error: DBDataError (pymysql.err.DataError) (1406, u"Data too long for column 'volume_id' at row 1") [SQL: u'INSERT INTO block_device_mapping (created_at, updated_at, deleted_at, deleted, instance_uuid, source_type, destination_type, guest_format, device_type, disk_bus, boot_index, device_name, delete_on_termination, snapshot_id, volume_id, volume_size, image_id, no_device, connection_info, tag, attachment_id) VALUES ...

master @ bc31f5a Merge "Add description to policies in"

Changed in nova:
status: New → Confirmed
assignee: nobody → Dinesh Bhor (dinesh-bhor)
Changed in nova:
assignee: Dinesh Bhor (dinesh-bhor) → Pooja Jadhav (poojajadhav)
status: Confirmed → In Progress
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → Confirmed
assignee: Pooja Jadhav (poojajadhav) → nobody
ABHAY (ankatare) on 2018-01-17
Changed in nova:
assignee: nobody → ABHAY (ankatare)
Changed in nova:
assignee: ABHAY (ankatare) → Deepak Mourya (mourya007)
Deepak Mourya (mourya007) wrote :

i am getting "error:No volume with a name or ID exists " in case of both wrong volume id or "--"(double hyphen) by using openstackclient

but can reproduce the same error using novaclient

Deepak Mourya (mourya007) wrote :

i am not able to reproduce the error from the master branch now . please guide me to reproduce the same

example :
  nova volume-attach 55d1cc71-b97c-4f35-bfe8-0db0ef094ff6 2ed28e84-7a3d-4e79-9de1--e9b03425c6e1

ERROR (NotFound): Volume 2ed28e84-7a3d-4e79-9de1--e9b03425c6e1 could not be found. (HTTP 404) (Request-ID: req-88b95263-9745-4bdd-b72c-fd7841169cfc)

Changed in nova:
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers