Merge lp:~tribaal/simplestreams/fix-lxd-image-types into lp:simplestreams

Proposed by Chris Glass
Status: Rejected
Rejected by: Scott Moser
Proposed branch: lp:~tribaal/simplestreams/fix-lxd-image-types
Merge into: lp:simplestreams
Diff against target: 11 lines (+1/-0)
1 file modified
simplestreams/mirrors/glance.py (+1/-0)
To merge this branch: bzr merge lp:~tribaal/simplestreams/fix-lxd-image-types
Reviewer Review Type Date Requested Status
Данило Шеган (community) Approve
simplestreams-dev Pending
Review via email: mp+299657@code.launchpad.net

Description of the change

This branch adds the image format used by cloud-images.ubuntu.com to the LXD type (use when the configuration specifies "hypervisor_mapping" as non-null (what the lib considers "True").

Example for xenial: http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-lxd.tar.xz

To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

LGTM.

review: Approve
Revision history for this message
Scott Moser (smoser) wrote :

chris pinged me in irc, so i'll just replay that here:

<tribaal> smoser: basically just adds the lxd image format the archives actually use to the LXD images types whitelist
--- msbrown is now known as msbrown-afk
<smoser> tribaal, but is that right ?
<smoser> the lxd.tar.xz file is not actually useful
<smoser> it is not actually consumable by openstack (or nova-lxd)
<smoser> to my knowledge

if the lxd.tar.xz is not useful, then there is no reason to ever load it into glance.

Revision history for this message
Ryan Beisner (1chb1n) wrote :

For reference, here is the "manual" process we use to get LXD images into OpenStack for use with nova-lxd:

http://bazaar.launchpad.net/~ost-maintainers/openstack-charm-testing/trunk/view/head:/tools/images_lxd.sh

This allows one to successfully nova boot those images as lxd instances, given that there is such a hypervisor in said cloud.

Revision history for this message
Scott Moser (smoser) wrote :

So Ryan's comment above shows that they use the -root.tar.xz, *not* the -lxd.tar.xz.
Ryan's command does:
glance --os-image-api-version 1 image-create --name="trusty-lxd" --is-public=true --progress \
    --container-format=bare --disk-format=raw --property hypervisor_type=lxc \
    --property architecture=x86_64 < ~/images/trusty-server-cloudimg-amd64-root.tar.xz

For lxc type, it looks like we set:
  container_format: bare
  disk_format: root-tar
  architecture: x86_64

The one thing that looks different is glance mirror would set disk_format to 'root-tar', while Ryan is setting it to 'raw'. root-tar seems much closer to 'correct', but that doesn't matter a darn if its not what nova-lxd wants.

Revision history for this message
Scott Moser (smoser) wrote :

I'm marking this as 'rejected'.
Please feel free to re-open if you think that is not right.

Unmerged revisions

438. By Chris Glass

Added the "lxd.tar.xz" type as a LXD hypervisor format for disk images.
The ubuntu archives (cloud-images.ubuntu.com) actually use that format for lxd.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'simplestreams/mirrors/glance.py'
2--- simplestreams/mirrors/glance.py 2016-06-14 20:21:05 +0000
3+++ simplestreams/mirrors/glance.py 2016-07-11 07:19:08 +0000
4@@ -65,6 +65,7 @@
5 LXC_FTYPES = [
6 'root.tar.gz',
7 'root.tar.xz',
8+ 'lxd.tar.xz',
9 ]
10
11 QEMU_FTYPES = [

Subscribers

People subscribed via source and target branches

to all changes: