SRU cloud-initramfs-rooturl to archive

Bug #1688606 reported by Scott Moser on 2017-05-05
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-images
Medium
Unassigned
cloud-initramfs-tools (Ubuntu)
Medium
Unassigned
Trusty
Medium
Unassigned
Xenial
Medium
Unassigned
Yakkety
Medium
Unassigned

Bug Description

=== Begin SRU Template ===
[Impact]
MAAS has an interest in booting entirely ephemerally without iscsi root.
The package cloud-initramfs-rooturl supports booting with root coming
from a url.
  root=http://..../squashfs

This function will be used to pxe boot into a RAM only system with no
dependency on the network.

[Test Case]
See the attached prepare-1688606.sh. That script automates
everything here making this much easier to test.

1. make sure squashfs module is in the initramfs
   squashfs module is not automatically added to initramfs in precise.
   Just ensure that it is there.

   $ [ "$(lsb_release -sc)" = "precise" ] &&
      echo "manual_add_modules squashfs" |
         sudo tee /etc/initramfs-tools/hooks/squashfs

2. install cloud-initramfs-rooturl
   sudo apt-get update
   sudo apt-get install cloud-initramfs-rooturl

3. collect the kernel and newly generated initramfs

   sudo cat /boot/vmlinu?-$(uname -r) > kernel
   cp /boot/initrd.img-$(uname -r) initrd

4. Download a squashfs image or a .tar.xz image

   rel="xenial"
   burl="http://cloud-images.ubuntu.com/daily/server"
   file="$rel-server-cloudimg-amd64-root.tar.xz"
   file="$rel-server-cloudimg-amd64.squashfs"
   wget "$burl/$rel/current/$file" -O "$file"

5. run a web server
   python -m SimpleHTTPServer 9999 &

6. create a seed disk for cloud-init.

   $ cat > my-user-data <<EOF
   #cloud-config
   password: passw0rd
   chpasswd: { expire: False }
   ssh_pwauth: True

   $ echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-data
   $ cloud-localds seed.img my-user-data my-meta-data

7. Boot a vm using the kernel, initrd and url.

   cmdline="root=http://10.0.2.2:9999/$file console=ttyS0 -v "
   cmdline="${cmdline} overlayroot=tmpfs"

   qemu-system-x86_64 -enable-kvm \
      -device virtio-net-pci,netdev=net00 \
      -netdev type=user,id=net00 \
      -drive if=virtio,file=seed.img \
      -m 1G -nographic \
      -kernel kernel -initrd initrd \
      -append "root=$cmdline"

[Regression Potential]
Low. This is adding a package previously not present.

[Other Info]
Related bugs:
 * bug 1689557: replace iscsi usage in ephemeral image with rooturl
 * bug 1689642: cloud-initramfs-rooturl should manual_add_modules squashfs

=== End SRU Template ===

Related branches

Scott Moser (smoser) on 2017-05-05
Changed in cloud-initramfs-tools (Ubuntu Precise):
status: New → Confirmed
Changed in cloud-initramfs-tools (Ubuntu Trusty):
status: New → Confirmed
Changed in cloud-initramfs-tools (Ubuntu Xenial):
status: New → Confirmed
Changed in cloud-initramfs-tools (Ubuntu Yakkety):
status: New → Confirmed
Changed in cloud-initramfs-tools (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in cloud-initramfs-tools (Ubuntu Precise):
importance: Undecided → Medium
Changed in cloud-initramfs-tools (Ubuntu Trusty):
importance: Undecided → Medium
Changed in cloud-initramfs-tools (Ubuntu Xenial):
importance: Undecided → Medium
Changed in cloud-initramfs-tools (Ubuntu Yakkety):
importance: Undecided → Medium
description: updated
Scott Moser (smoser) on 2017-05-05
no longer affects: cloud-initramfs-tools (Ubuntu Precise)
Scott Moser (smoser) on 2017-05-05
description: updated
Scott Moser (smoser) wrote :

I've added a 'maas-images' task for this. Under that task we will add the cloud-initramfs-rooturl package to the initramfs that are generated there.

Scott Moser (smoser) on 2017-05-09
description: updated
Changed in maas-images:
status: New → Triaged
importance: Undecided → Medium
description: updated
Scott Moser (smoser) on 2017-05-09
description: updated
Scott Moser (smoser) wrote :
description: updated

An upload of cloud-initramfs-tools to yakkety-proposed has been rejected from the upload queue for the following reason: "Per uploader request.".

Hello Scott, or anyone else affected,

Accepted cloud-initramfs-tools into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-initramfs-tools/0.25ubuntu1.14.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-initramfs-tools (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in cloud-initramfs-tools (Ubuntu Xenial):
status: Confirmed → Fix Committed
Adam Conrad (adconrad) wrote :

Hello Scott, or anyone else affected,

Accepted cloud-initramfs-tools into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-initramfs-tools/0.27ubuntu1.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-initramfs-tools (Ubuntu Yakkety):
status: Confirmed → Fix Committed
Adam Conrad (adconrad) wrote :

Hello Scott, or anyone else affected,

Accepted cloud-initramfs-tools into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-initramfs-tools/0.30ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-initramfs-tools (Ubuntu):
status: Confirmed → Invalid
Scott Moser (smoser) wrote :

I'm attaching version 2 of this script.
The changes from the first are from actually attempting the sru.
What I found was that
a.) trusty's initramfs built from linux-image-virtual cannot mount iso9660 or vfat filesystems.
   As a result I changed to using a command line parameter:
    ds=nocloud-net;seedfrom=http://../
   The url is the same as the file url and the user-data and meta-data just come from
   that location rather than the nocloud seed.img

b.) trusty needed more memory.
   I could have just added '-m 2G' instead of '-m 1G' on the qemu-system-x86_64 line.
   Instead I passed 'rootflags=size=75%' on the kernel command line. those get passed on
   to the mount of the tmpfs and all is well.

Scott Moser (smoser) wrote :

I've verified each of trusty,yakkety and xenial by modifying the user-data in the script and then running

bash -c 'set -o pipefail; for i in "$@"; do
   ./prepare-1688606.sh $i 2>&1 | tee $i.log || break;
  ( cd $i && ./boot >../$i-boot.log 2>&1 </dev/null );
  done' -- trusty xenial yakkety

I'll attach <release>.log and <release>-boot.log for each.

The modification to the script was just to add the following into the user-data. you can see its output in the logs.

runcmd:
 - ['sh', '-c', 'echo ====================================']
 - ['sh', '-c', 'echo === /proc/mounts ===; cat /proc/mounts']
 - ['sh', '-c', 'echo === /proc/cmdline === ; cat /proc/cmdline']
 - ['sh', '-c', 'echo === df -h ===; df -h']
 - ['sh', '-c', 'echo === free ===; free']
 - ['sh', '-c', '( sleep 10 ; poweroff )</dev/null >/dev/null 2>&1 &']
 - ['sh', '-c', 'echo ====================================']

Scott Moser (smoser) wrote :
Scott Moser (smoser) wrote :
Scott Moser (smoser) wrote :
Scott Moser (smoser) wrote :
Scott Moser (smoser) wrote :
Scott Moser (smoser) wrote :
tags: added: verification-done-trusty verification-done-xenial verification-done-yakkety
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-initramfs-tools - 0.30ubuntu1.2

---------------
cloud-initramfs-tools (0.30ubuntu1.2) yakkety; urgency=medium

  * Add cloud-initramfs-rooturl package (LP: #1688606).

 -- Scott Moser <email address hidden> Thu, 11 May 2017 16:11:05 -0400

Changed in cloud-initramfs-tools (Ubuntu Yakkety):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for cloud-initramfs-tools has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-initramfs-tools - 0.27ubuntu1.4

---------------
cloud-initramfs-tools (0.27ubuntu1.4) xenial; urgency=medium

  * Add cloud-initramfs-rooturl package (LP: #1688606).

 -- Scott Moser <email address hidden> Thu, 11 May 2017 16:29:13 -0400

Changed in cloud-initramfs-tools (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-initramfs-tools - 0.25ubuntu1.14.04.2

---------------
cloud-initramfs-tools (0.25ubuntu1.14.04.2) trusty-proposed; urgency=medium

  * Add cloud-initramfs-rooturl package (LP: #1688606).

 -- Scott Moser <email address hidden> Thu, 11 May 2017 15:58:08 -0400

Changed in cloud-initramfs-tools (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers