** Description changed: + http://pad.lv/1684869 + https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1684869 + + === Begin SRU Template === + [Impact] + Growing the root partition would fail in either of two cases: + a.) if the device /dev/root existed + b.) the kernel command line had upper case letters in PARTUUID=<value> + + [Test Case] + get-proposed-image is + https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/get-proposed-image + It downloads a cloud image of a given release, and then creates a -proposed + image with cloud-init upgraded. + + 1.) get a (proposed) disk image image. + and convert it to raw so you can read the partuuid with sfdisk + (get-proposed-image does this, if not, + 'qemu-img convert -O raw orig.img orig.raw') + ./get-proposed-image + + 2.) get the partition uuid of the first partition + $ raw=yakkety-server-cloudimg-amd64-proposed.raw + $ ptuuid=$(sfdisk --part-uuid $raw 1) + + 3.) create a nocloud seed + $ printf "%s\n%s\n%s\n%s\n" "#cloud-config" "password: passw0rd" \ + "chpasswd: {expire: False}" "ssh_pwauth: True" > my-user-data + $ echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-data + $ cloud-localds my-seed.img my-user-data my-meta-data + + 4.) extract kernel from inside the image + $ sudo mount-image-callback $raw -- mchroot sh -xc 'cat /boot/vmlinu?-*' > kernel + + 5.) boot instance with disk backed by the raw disk above. + + $ qemu-img create -f qcow2 -b $raw disk.img 10G + $ qemu-system-x86_64 -enable-kvm \ + -drive file=disk.img,if=ide,index=0 -drive file=my-seed.img,if=ide \ + -net nic -net user,hostfwd=tcp::2222-:22 \ + -snapshot -m 768 -nographic -echr 0x05 \ + -kernel kernel \ + -append "root=PARTUUID=${ptuuid} ro console=tty1 console=ttyS0" + + 6.) log in, verify / has been resized. + log in with 'ubuntu' and password 'passw0rd' + $ df -h / + Filesystem Size Used Avail Use% Mounted on + /dev/root 9.6G 1009M 8.6G 11% / + + + [Regression Potential] + The regression path is really the case where devent2dev finds /dev/root + and /dev/root exists. In that case, we now possibly return a /dev/<device> + path when previously it would have returned /dev/root. + + + [Other Info] + The qemu-system-x86 command above uses ide devices. This is because + the ide device emulated by qemu is built into the -generic kernel, + whilei the more common virtio-block or virtio-scsi are not. If you + attach those device types, it will fail with 'cant find root'. + + === End SRU Template === + When trying to verify I found a couple cases where this still does not work. - Related bugs: - * bug 1677376: growing partitions does not work when booted without initramfs + * bug 1677376: growing partitions does not work when booted without initramfs
** Description changed: - http://pad.lv/1684869 - https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1684869 - === Begin SRU Template === [Impact] Growing the root partition would fail in either of two cases: - a.) if the device /dev/root existed - b.) the kernel command line had upper case letters in PARTUUID=<value> + a.) if the device /dev/root existed + b.) the kernel command line had upper case letters in PARTUUID=<value> [Test Case] - get-proposed-image is - https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/get-proposed-image + get-proposed-image is + https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/get-proposed-image It downloads a cloud image of a given release, and then creates a -proposed image with cloud-init upgraded. 1.) get a (proposed) disk image image. - and convert it to raw so you can read the partuuid with sfdisk - (get-proposed-image does this, if not, - 'qemu-img convert -O raw orig.img orig.raw') - ./get-proposed-image + and convert it to raw so you can read the partuuid with sfdisk + (get-proposed-image does this, if not, + 'qemu-img convert -O raw orig.img orig.raw') + ./get-proposed-image 2.) get the partition uuid of the first partition - $ raw=yakkety-server-cloudimg-amd64-proposed.raw - $ ptuuid=$(sfdisk --part-uuid $raw 1) + $ raw=yakkety-server-cloudimg-amd64-proposed.raw + $ ptuuid=$(sfdisk --part-uuid $raw 1) 3.) create a nocloud seed - $ printf "%s\n%s\n%s\n%s\n" "#cloud-config" "password: passw0rd" \ - "chpasswd: {expire: False}" "ssh_pwauth: True" > my-user-data - $ echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-data - $ cloud-localds my-seed.img my-user-data my-meta-data + $ printf "%s\n%s\n%s\n%s\n" "#cloud-config" "password: passw0rd" \ + "chpasswd: {expire: False}" "ssh_pwauth: True" > my-user-data + $ echo "instance-id: $(uuidgen || echo i-abcdefg)" > my-meta-data + $ cloud-localds my-seed.img my-user-data my-meta-data 4.) extract kernel from inside the image - $ sudo mount-image-callback $raw -- mchroot sh -xc 'cat /boot/vmlinu?-*' > kernel + $ sudo mount-image-callback $raw -- mchroot sh -xc 'cat /boot/vmlinu?-*' > kernel 5.) boot instance with disk backed by the raw disk above. - $ qemu-img create -f qcow2 -b $raw disk.img 10G - $ qemu-system-x86_64 -enable-kvm \ - -drive file=disk.img,if=ide,index=0 -drive file=my-seed.img,if=ide \ - -net nic -net user,hostfwd=tcp::2222-:22 \ - -snapshot -m 768 -nographic -echr 0x05 \ - -kernel kernel \ - -append "root=PARTUUID=${ptuuid} ro console=tty1 console=ttyS0" + $ qemu-img create -f qcow2 -b $raw disk.img 10G + $ qemu-system-x86_64 -enable-kvm \ + -drive file=disk.img,if=ide,index=0 -drive file=my-seed.img,if=ide \ + -net nic -net user,hostfwd=tcp::2222-:22 \ + -snapshot -m 768 -nographic -echr 0x05 \ + -kernel kernel \ + -append "root=PARTUUID=${ptuuid} ro console=tty1 console=ttyS0" 6.) log in, verify / has been resized. - log in with 'ubuntu' and password 'passw0rd' - $ df -h / - Filesystem Size Used Avail Use% Mounted on - /dev/root 9.6G 1009M 8.6G 11% / + log in with 'ubuntu' and password 'passw0rd' + $ df -h / + Filesystem Size Used Avail Use% Mounted on + /dev/root 9.6G 1009M 8.6G 11% / - - [Regression Potential] + [Regression Potential] The regression path is really the case where devent2dev finds /dev/root and /dev/root exists. In that case, we now possibly return a /dev/<device> path when previously it would have returned /dev/root. - [Other Info] The qemu-system-x86 command above uses ide devices. This is because the ide device emulated by qemu is built into the -generic kernel, whilei the more common virtio-block or virtio-scsi are not. If you attach those device types, it will fail with 'cant find root'. === End SRU Template === When trying to verify I found a couple cases where this still does not work. Related bugs: * bug 1677376: growing partitions does not work when booted without initramfs ** Changed in: cloud-init (Ubuntu) Status: New => Confirmed ** Changed in: cloud-init (Ubuntu) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1684869 Title: growing root partition does not always work with root=PARTUUID= To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1684869/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs