Merge lp:~smoser/maas-images/trunk.precise-squashfs into lp:maas-images

Proposed by Scott Moser
Status: Merged
Merged at revision: 390
Proposed branch: lp:~smoser/maas-images/trunk.precise-squashfs
Merge into: lp:maas-images
Diff against target: 12 lines (+1/-1)
1 file modified
meph2/stream.py (+1/-1)
To merge this branch: bzr merge lp:~smoser/maas-images/trunk.precise-squashfs
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Lee Trager (community) Approve
Review via email: mp+337011@code.launchpad.net

Description of the change

Always create squashfs image if configured.

For precise in the v3 stream there was no 'squashfs' image created.
This was enabled only if input to the build was '.tar.gz' or 'squashfs'.

As we need a squashfs image for installing precise with maas 2.3+,
we modify the code here to build that image.

Note that this squashfs image is known to not boot with rooturl
as the other squashfs images produced do.

To post a comment you must log in.
388. By Scott Moser

Always create squashfs image if configured.

For precise in the v3 stream there was no 'squashfs' image created.
This was enabled only if input to the build was '.tar.gz' or 'squashfs'.

As we need a squashfs image for installing precise with maas 2.3+,
we modify the code here to build that image.

Note that this squashfs image is known to not boot with rooturl
as the other squashfs images produced here.

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

I've tested that it builds the squashfs image by:
  meph2-build -vv --config=conf/meph-v3.yaml amd64 precise \
     20180201 precise-server-cloudimg-amd64-root.tar.xz \
     precise-output.d/

The squashfs image will be generated in another way:
  using 'img2squashfs' from the last built image

Thus, *This change is not strictly necessary*.

However, it is good to have the maas-images code correctly
building the output if we ever needed to do that again.

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

For reference, bug 1746345 will cover the creation of the squashfs image and updating of maas v3 stream.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

are we sure that we wont try to convert a .tar.xz or tgz or tgx by making this change? it seems this change ensures to only conver to squashfs if the file is .tar.gz

review: Needs Information
Revision history for this message
Lee Trager (ltrager) wrote :

LGTM!

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

Andres,

The code here will basically turn the 'root-image.gz' file that was created during the build process into a squashfs image.

Previously that code path would not be taken if the *input* to this build was a '.tar.gz'
file. That was completely arbitrary. The code supports multiple inputs and generating
many outputs. It really should not have ever had different output based on the input.
It should have had explicit flag or knowledge that squashfs should not be created.

I pushed another minor tweak that just shortens the code.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

thanks for the explanation.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'meph2/stream.py'
2--- meph2/stream.py 2017-07-14 18:11:02 +0000
3+++ meph2/stream.py 2018-02-01 19:07:54 +0000
4@@ -323,7 +323,7 @@
5 # If we're not publishing the SquashFS image but used it to
6 # generate the root-img clean it up.
7 os.remove(src_squash)
8- elif squashfs and img_url.endswith('tar.gz'):
9+ elif squashfs:
10 # If the stream is publishing SquashFS images convert any
11 # non-SquashFS image into a SquashFS image. Both the root-image.gz
12 # and SquashFS image will be included but MAAS will only use the

Subscribers

People subscribed via source and target branches