You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I retain the original image metadata properties when I distribute images using lxd-image-server ...? I do have some custom logic, which does some magic based upon the image variant. But this property seems to get lost when the image is downloaded:
How to reproduce
I'm building different variants of the same distribution using distrobuilder and upload them to lxd-image-server using scp. After upload I'm executing lxd-image-server update to rebuild the json files. Then, I pull the images to a local lxd using the following commands:
As you can see, there is no variant property. However, if you download the lxd.tar.xz file, unpack it and look at the metadata.yaml its there (the description is different as well):
@carlosduelo I'm happy to provide a PR, but don't know where to start. Would be awesome if you can point me towards where to start, because this issue is a blocker for me.
FWIW: Executing the following commands show the image metadata is missing when requested through lxd-image-server - although it is part of the image itself stored on lxd-image-server as shown before:
It seems like lxd-image-server generates it's own metadata based on the directory structure, thus completly ignoring the image's metadata
I think the best way would be to:
add a flag to directly use the image's metadata.yaml (--honor-metadata-yaml / --use-metadata-from-image)
this would also mean the directory structure would just be arbitrary 1 folder=1 image
when updating the metadata extract the metadata.yaml from each image, store it in a cache (or use cached version) and then write the list of images with their actual extracted metadata
How can I retain the original image metadata properties when I distribute images using
lxd-image-server
...? I do have some custom logic, which does some magic based upon the imagevariant
. But this property seems to get lost when the image is downloaded:How to reproduce
I'm building different variants of the same distribution using
distrobuilder
and upload them tolxd-image-server
usingscp
. After upload I'm executinglxd-image-server update
to rebuild the json files. Then, I pull the images to a local lxd using the following commands:And display the image metadata with:
As you can see, there is no
variant
property. However, if you download the lxd.tar.xz file, unpack it and look at the metadata.yaml its there (the description is different as well):The text was updated successfully, but these errors were encountered: