Merge lp://qastaging/~smoser/simplestreams/trunk.1686086 into lp://qastaging/simplestreams

Proposed by Scott Moser
Status: Merged
Merged at revision: 455
Proposed branch: lp://qastaging/~smoser/simplestreams/trunk.1686086
Merge into: lp://qastaging/simplestreams
Diff against target: 193 lines (+86/-16)
2 files modified
simplestreams/mirrors/glance.py (+65/-13)
tests/unittests/test_glancemirror.py (+21/-3)
To merge this branch: bzr merge lp://qastaging/~smoser/simplestreams/trunk.1686086
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
David Ames (community) Needs Fixing
simplestreams-dev Pending
Review via email: mp+323239@code.qastaging.launchpad.net

Commit message

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 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'.

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

Interested in thoughts from anyone who sees this.
I'm aware that it'd be nice to have a full "sync" call on this in unit tests.

The other question is really just if this is the right thing to do... the logic is just that if the input stream has both a root-tar (root-tar.gz or root-tar.xz) that was not filtered out, *and* has a squashfs image, then we ignore the squashfs image. Thats just to avoid getting both uploaded, which would be kind of confusing.

Another option woudl be to just upload whatever the filter let in, and expect users to change to filtering out the root-tar.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
451. By Scott Moser

merge with trunk

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Ames (thedac) wrote :

Other than the print statement, this looks good to me.

I have asked James Page to give it a look as well.

review: Needs Fixing
452. By Scott Moser

address thedac feedback: remove print statement

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: