[glance][kolla] importing images on filesystem without copy?
Folks, I'm trying to wrap my brain around whether this is possible. Suppose I've configured Glance to use a filesystem backend. Would I be able to point Glance at a directory of existing images, and have it import the images into OpenStack (thus populating the database) without having to copy them? It seems fairly redundant to have the images on the filesystem, and to make copies as part of the creation process. Looking around in the documentation, it seems that this may not be possible, but I'm not sure if there's an alternate path or if what I'm asking is ill-posed. Any advice would be useful. Thanks, Rob
Hi, I don't think this is possible. Importing an image to glance is not just having an image path but also creating a UUID, adding metadata, don't know what else there is involved. I'm not a dev, maybe it would be possible without too much effort, but someone with more glance experience should comment on that. I just noticed that nobody had responded in a week. Regards, Eugen Zitat von Rob Jefferson <techstep@gmail.com>:
Folks,
I'm trying to wrap my brain around whether this is possible.
Suppose I've configured Glance to use a filesystem backend. Would I be able to point Glance at a directory of existing images, and have it import the images into OpenStack (thus populating the database) without having to copy them? It seems fairly redundant to have the images on the filesystem, and to make copies as part of the creation process.
Looking around in the documentation, it seems that this may not be possible, but I'm not sure if there's an alternate path or if what I'm asking is ill-posed.
Any advice would be useful.
Thanks,
Rob
On Mon, 2023-08-21 at 11:26 +0000, Eugen Block wrote:
Hi,
I don't think this is possible. Importing an image to glance is not just having an image path but also creating a UUID, adding metadata, don't know what else there is involved. I'm not a dev, maybe it would be possible without too much effort, but someone with more glance experience should comment on that. I just noticed that nobody had responded in a week.
Regards, Eugen
Zitat von Rob Jefferson <techstep@gmail.com>:
Folks,
I'm trying to wrap my brain around whether this is possible.
Suppose I've configured Glance to use a filesystem backend. Would I be able to point Glance at a directory of existing images, and have it import the images into OpenStack (thus populating the database) without having to copy them? It seems fairly redundant to have the images on the filesystem, and to make copies as part of the creation process. as far as im aware that is not possible. as with almost all openstack services glance is intended to be self service for normal users. i.e. users who will hopefully not have direct access to the filesystem where glances backing store is.
what you proably could do is take that existing directory and expose it vai a web server. you can then add those as external image by setting the glance backing store location to the http url. you would still need to add each image but you woudl not need to copy the data. instead you jsut set the image location to the url. this requires using the glance http store backend and it requries using admin privileges https://specs.openstack.org/openstack/glance-specs/specs/2023.2/approved/gla... will make this a little more secure but in general i would consider this to be an anti pattern. in general its best to provision image in glance the same way your end users will to ensure that if there is a config error or similar that you will expeirnce it before your users do. the other issue with the http store is unlike other backend where glance it manging the stored iamges, its much eaiser for the image to be delete or change without glance knowing via the http store. sure you can always got to ceph or the filesystem and delete the image but its generally harder to compomise the images then with the http store.
Looking around in the documentation, it seems that this may not be possible, but I'm not sure if there's an alternate path or if what I'm asking is ill-posed.
Any advice would be useful.
Thanks,
Rob
participants (3)
-
Eugen Block
-
Rob Jefferson
-
smooney@redhat.com