Glance Image Can Be Orphaned If Backing Cinder Volume Deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Undecided
|
Unassigned |
Bug Description
If you create a cinder-
I think ideally glance should have some knowledge of which volume locations are valid otherwise you could end up with an orphaned image if the backing location is invalidated.
Reproduction Steps:
Follow the steps outlined on this page to enable the Glance volume-backed image-cache:
http://
1. Make sure glance-api.conf has these lines:
`stores = file, http, cinder`
`show_multiple_
2. Make sure cinder.conf has these lines in DEFAULT
`glance_api_version = 2`
`allowed_
3. Make sure current backend section in cinder.conf has these lines:
`image_
`image_
4. Restart glance and cinder services
5. Create a Cinder volume and write some data to it (the data writing isn't really necessary for the bug though)
`cinder create 5 --display-name testvol`
6. Create a glance image that has this volume as a location:
`openstack image create --disk-format raw --container-format bare my-test-image`
`glance location-add <my-test-
7. Create a new Cinder volume from the new image:
`openstack volume create testvol2 --image <my-test-
8. Delete testvol
`cinder delete <testvol-uuid>`
9. Perform step #7 again, this time it will fail with an HTTP 500 error in the cinder volume logs
2017-01-09 22:52:16.294 ERROR oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
2017-01-09 22:52:16.294 TRACE oslo_messaging.
Because the image in glance still lists this volume as a valid location
`glance image-show <my-test-
description: | updated |
description: | updated |