growing partitions does not work when booted without initramfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Steve Langasek | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[SRU Justification]
When booted without an initramfs, the root device will be /dev/root, not a
named device. There is partial support for this when resizing filesystems,
but not for growing partitions, without which it doesn't do much good.
A system boots significantly slower with an initramfs than without, and we care about boot speed; a user should not have to have to boot with an initramfs to take advantage of root partition resizing.
[Test case]
Because there are not yet any official Ubuntu images that boot without initramfs, the test case is somewhat opaque. Here is a test case that should work with public branches, though I will be doing validation in GCE using a private branch.
1. Build livecd-rootfs from lp:~vorlon/livecd-rootfs/minimizing/ and upload it to a ppa.
2. bzr branch lp:launchpad-buildd
3. run the following setup commands:
export BUILDID=
export CHROOT_
wget http://
mkdir -p $CHROOT_ROOT/build
tar -C $CHROOT_ROOT -x -f /tmp/root.tar.xz
rm $CHROOT_
launchpad-
launchpad-
4. Run a build without -proposed enabled:
launchpad-
5. Boot the resulting image ($HOME/
6. Verify that the image boots but does not expand the root partition.
7. Run a build again with -proposed enabled:
launchpad-
8. Boot the resulting image in an openstack environment.
9. Verify that the image boots, and that this time the root partition is expanded to use the full disk.
[Regression potential]
Users with existing initramfsless images that are configured with the default of resizing the root partition may be surprised when this starts to work. However, this only applies to first boot of an image, so only newly-mastered images would be affected, so this should be caught by any image CI before the affected users put such an image into production if it has serious impact for them.
Related bugs:
* bug 1684869: growing root partition does not always work with root=PARTUUID=
* bug 1685291: RFC: virtio and virtio-scsi should be built in
Related branches
- Scott Moser: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 99 lines (+40/-21)3 files modifiedcloudinit/config/cc_growpart.py (+10/-1)
cloudinit/config/cc_resizefs.py (+1/-20)
cloudinit/util.py (+29/-0)
Changed in cloud-init: | |
assignee: | nobody → Steve Langasek (vorlon) |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-init: | |
status: | In Progress → Fix Committed |
Changed in cloud-init (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Yakkety): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Yakkety): | |
importance: | Undecided → Medium |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in cloud-init: | |
status: | Fix Committed → Fix Released |
This bug was fixed in the package cloud-init - 0.7.9-87- gd23543eb- 0ubuntu1
--------------- 87-gd23543eb- 0ubuntu1) zesty; urgency=medium
cloud-init (0.7.9-
* debian/ cloud-init. templates: add Bigstep to list of sources. (LP: #1676460)
* New upstream snapshot.
- net: in netplan renderer delete known image-builtin content.
(LP: #1675576)
- doc: correct grammar in capabilities.rst [David Tagatac]
- ds-identify: fix detecting of maas datasource. (LP: #1677710)
- netplan: remove debugging prints, add debug logging [Ryan Harper]
- ds-identify: do not write None twice to datasource_list.
- support resizing partition and rootfs on system booted without initramfs.
(LP: #1677376) [Steve Langasek]
- apt_configure: run only when needed. (LP: #1675185)
- OpenStack: identify OpenStack by product 'OpenStack Compute'.
(LP: #1675349)
- GCE: Search GCE in ds-identify, consider serial number in check.
(LP: #1674861)
- Add support for setting hashed passwords [Tore S. Lonoy] (LP: #1570325)
-- Scott Moser <email address hidden> Thu, 30 Mar 2017 16:46:43 -0400