-
Committer:
Scott Moser
-
Date:
2017-11-02 19:03:37 UTC
-
mfrom:
(448.2.4 trunk.1686086)
-
Revision ID:
smoser@ubuntu.com-20171102190337-sdgzf8w38y7ds9ld
OpenStack: support uploading squash images for nova-lxd.
Previously, populating a nova-lxd cloud was possible by using
root.tar.gz. A filter like:
ftype~(root.tar.gz|root.tar.xz)
would cause simplestreams to upload an image with 'disk-format' of
root-tar.
However, Ubuntu 17.04 and newer do not have root.tar.gz or root.tar.xz
images available. Currently here is what is available:
14.04: root.tar.gz root.tar.xz
16.04: root.tar.gz root.tar.xz squashfs
17.10: squashfs
If we simply expected the user to change their filter to include
root.tar.xz|squashfs
Then they would get two lxd images imported for 16.04 each version.
The change here is to not do anything for an item insert, but instead
insert when the version's insert is called. Then, all the information
about what images there are is available, and it can "pick"
one or the other. Currently preference is given to the .tar.xz format.
The end result is that now users can specify an ftype filter of:
ftype~(root.tar.gz|root.tar.xz|squashfs)
and the right thing will be done.
Also here is simple knowledge that the squashfs type should be
uploaded to glance with a 'disk_format' of 'squashfs'.