Merge lp://staging/~smoser/maas-images/trunk.add-zfs into lp://staging/maas-images

Proposed by Scott Moser
Status: Merged
Merged at revision: 386
Proposed branch: lp://staging/~smoser/maas-images/trunk.add-zfs
Merge into: lp://staging/maas-images
Diff against target: 43 lines (+27/-0)
1 file modified
bin/kpack-from-image (+27/-0)
To merge this branch: bzr merge lp://staging/~smoser/maas-images/trunk.add-zfs
Reviewer Review Type Date Requested Status
Lee Trager (community) Approve
Review via email: mp+335179@code.staging.launchpad.net

Commit message

Add zfs module and dependencies to generated initramfs.

In order for curtin to use zfs, it has to have access to the modules.
Add 'zfs' and its dependencies to the initramfs.

Note that the user-space tools (zfsutils-linux) are not currently
a dependency of ubuntu-server and are thus not in the squashfs images.
That means that for curtin to use zfs it has to install the package.

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

make executable

Revision history for this message
Scott Moser (smoser) wrote :
Download full text (8.8 KiB)

Tested functional for what I'm after, adding zfs to the boot-initrd.

$ bzr init-repo maas-images
$ cd maas-images
$ bzr branch lp:maas-images trunk
$ bzr branch lp:~smoser/maas-images/trunk.add-zfs add-zfs

$ rel=xenial ; arch=amd64
$ burl=http://cloud-images.ubuntu.com/
$ file=$PWD/$rel-server-cloudimg-amd64.squashfs
$ wget $burl/$rel/current/$rel-server-cloudimg-amd64.squashfs -O "$file"

$ for d in add-zfs trunk; do
   ( cd $d &&
     PATH=$PWD/bin:$PATH ./bin/meph2-build --config=conf/meph-v3.yaml \
        $arch $rel $(date +"%Y%m%d") $file $rel-output.d/ 2>&1 ) |
   tee $d-out.log
  done

$ for initrd in $(cd trunk && find $rel-output.d -name boot-initrd ); do
    for br in add-zfs trunk; do
       [ -f "$br/$initrd.list" ] && continue
       lsinitramfs $br/$initrd | grep -v "boot-initrd" | sort > $br/$initrd.list
    done
    echo ==== $initrd ====
    diff -u trunk/$initrd.list add-zfs/$initrd.list
done

==== xenial-output.d/xenial/amd64/20171213/hwe-16.04/lowlatency/boot-initrd ====
--- trunk/xenial-output.d/xenial/amd64/20171213/hwe-16.04/lowlatency/boot-initrd.list 2017-12-13 19:52:30.218963551 +0000
+++ add-zfs/xenial-output.d/xenial/amd64/20171213/hwe-16.04/lowlatency/boot-initrd.list 2017-12-13 19:52:24.419032666 +0000
@@ -2006,6 +2006,19 @@
 lib/modules/4.10.0-42-lowlatency/kernel/virt
 lib/modules/4.10.0-42-lowlatency/kernel/virt/lib
 lib/modules/4.10.0-42-lowlatency/kernel/virt/lib/irqbypass.ko
+lib/modules/4.10.0-42-lowlatency/kernel/zfs
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/avl
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/avl/zavl.ko
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/nvpair
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/nvpair/znvpair.ko
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/spl
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/spl/spl.ko
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/unicode
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/unicode/zunicode.ko
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/zcommon
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/zcommon/zcommon.ko
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/zfs
+lib/modules/4.10.0-42-lowlatency/kernel/zfs/zfs/zfs.ko
 lib/modules/4.10.0-42-lowlatency/modules.alias
 lib/modules/4.10.0-42-lowlatency/modules.alias.bin
 lib/modules/4.10.0-42-lowlatency/modules.builtin
==== xenial-output.d/xenial/amd64/20171213/hwe-16.04/generic/boot-initrd ====
--- trunk/xenial-output.d/xenial/amd64/20171213/hwe-16.04/generic/boot-initrd.list 2017-12-13 19:52:41.686828209 +0000
+++ add-zfs/xenial-output.d/xenial/amd64/20171213/hwe-16.04/generic/boot-initrd.list 2017-12-13 19:52:36.094894204 +0000
@@ -2006,6 +2006,19 @@
 lib/modules/4.10.0-42-generic/kernel/virt
 lib/modules/4.10.0-42-generic/kernel/virt/lib
 lib/modules/4.10.0-42-generic/kernel/virt/lib/irqbypass.ko
+lib/modules/4.10.0-42-generic/kernel/zfs
+lib/modules/4.10.0-42-generic/kernel/zfs/avl
+lib/modules/4.10.0-42-generic/kernel/zfs/avl/zavl.ko
+lib/modules/4.10.0-42-generic/kernel/zfs/nvpair
+lib/modules/4.10.0-42-generic/kernel/zfs/nvpair/znvpair.ko
+lib/modules/4.10.0-42-generic/kernel/zfs/spl
+lib/modules/4.10.0-42-generic/kernel/zfs/spl/spl.ko
+lib/modules/4.10.0-42-generic/kernel/zfs/unicode
+lib/modu...

Read more...

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

for reference, size delta. Roughly +800k.

$ for i in $( cd trunk && find * -name boot-initrd ); do stat --format="%s %n" trunk/$i add-zfs/$i; done
42099225 trunk/xenial-output.d/xenial/amd64/20171213/hwe-16.04/lowlatency/boot-initrd
42871558 add-zfs/xenial-output.d/xenial/amd64/20171213/hwe-16.04/lowlatency/boot-initrd
42101162 trunk/xenial-output.d/xenial/amd64/20171213/hwe-16.04/generic/boot-initrd
42872243 add-zfs/xenial-output.d/xenial/amd64/20171213/hwe-16.04/generic/boot-initrd
49492385 trunk/xenial-output.d/xenial/amd64/20171213/hwe-16.04-edge/lowlatency/boot-initrd
50261363 add-zfs/xenial-output.d/xenial/amd64/20171213/hwe-16.04-edge/lowlatency/boot-initrd
49480399 trunk/xenial-output.d/xenial/amd64/20171213/hwe-16.04-edge/generic/boot-initrd
50253976 add-zfs/xenial-output.d/xenial/amd64/20171213/hwe-16.04-edge/generic/boot-initrd
38413633 trunk/xenial-output.d/xenial/amd64/20171213/ga-16.04/lowlatency/boot-initrd
39219989 add-zfs/xenial-output.d/xenial/amd64/20171213/ga-16.04/lowlatency/boot-initrd
38423018 trunk/xenial-output.d/xenial/amd64/20171213/ga-16.04/generic/boot-initrd
39230727 add-zfs/xenial-output.d/xenial/amd64/20171213/ga-16.04/generic/boot-initrd

Revision history for this message
Ryan Harper (raharper) wrote :

Looks good, some suggestions on the comment wording.

388. By Scott Moser

improve comment

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

I'm pretty sure this works, but before we suggest merging i'd like to know that it does.
Ryan said he'll give it a full test.

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

Before this lands, I'll do a CI run.

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

CI passed with images created from this branch!

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

LGTM! Please check with Andres before landing.

review: Approve

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