Comment 15 for bug 1400966

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote : Re: Glance allows users to download and delete any file in glance-api server

For the direction/idea of fixing driver, like Hemanth mentioned above, something in my mind is that: Totally I think it's a worth thing to get due to I think we'd better don't suppose glance_store lib are used by glance only, other project, e.g. Nova, probably could leverage it as well. I'm a little worried if that way could be a blocker for migration or upgrade operation on glance however, if we always checks if given image location are lived in configured storage directory(s) at [0], we could prevent the problem happen, but if operator changed option of glance-api with a new storage folder and want to keep existing image works (the existing locations in db are pointing to original path), this approach will cause all location of existing images to be invalid, and limits operator to do that kind of migration/upgrade operation - he/she can't change storage directory(s) option even there's an available image, unless updating db at the same time, but I think it's a little heavy.

[0] https://github.com/openstack/glance_store/blob/master/glance_store/_drivers/filesystem.py#L47,L50,L334

Any thoughts?

Thanks

Btw, the fix for glance was proposed at https://review.openstack.org/#/c/141706/ .