Extract the volume ID from Glance multistore URLs.

Bug #1939242 reported by Peter Penchev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Undecided
Unassigned

Bug Description

If Glance's Cinder client is used as part of a multistore Glance installation, then Glance will store the URLs for the location of the Cinder volumes not as `cinder://uuid`, but as `cinder://backend_group/uuid`, see e.g. https://github.com/openstack/glance_store/blob/master/glance_store/_drivers/cinder.py#L443

This means thackt when Cinder tries to parse this URL to extract the volume ID when creating a volume from a Cinder-backed Glance image, it will take more than just the volume's UUID - it will also grab the "backend_group/" portion, leading to a failure to look up the volume immediately afterwards; see https://github.com/openstack/cinder/blob/master/cinder/volume/flows/manager/create_volume.py#L679

The fix is to only use the last /-terminated portion of the URL as the volume UUID. I will submit a Cinder change for review immediately.

Thanks for your time and consideration, and keep up the great work!

Revision history for this message
Peter Penchev (openstack-dev-s) wrote :

Right, so I messed up the Closes/Closes-Bug commit message lines, but see https://review.opendev.org/c/openstack/cinder/+/803862

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by "Peter Penchev <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/803862
Reason: There is a better approach in https://review.opendev.org/c/openstack/cinder/+/755654 although it needs a bit more work (I'll see what I can do about it there).

tags: added: glance multistore
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.