-
Notifications
You must be signed in to change notification settings - Fork 880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check_partition_layout has false positives when partitioned with gpt #2897
Comments
Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T18:09:07.319978+00:00 Hello Scott, or anyone else affected, Accepted cloud-init into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-153-g16a7302f-0ubuntu1~17.04.1 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! |
Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T18:56:06.286387+00:00 Hello Scott, or anyone else affected, Accepted cloud-init into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-153-g16a7302f-0ubuntu1~16.10.1 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! |
Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T19:09:37.412935+00:00 Hello Scott, or anyone else affected, Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-153-g16a7302f-0ubuntu1~16.04.1 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! |
Launchpad user Joshua Powers(powersj) wrote on 2017-06-20T23:30:09.209617+00:00 Verified on the following releases with versions of cloud-init in proposed: In an azure instance with a spare 8Gb disk: $ az vm create -n $name -g $group --image $image --data-disk-sizes-gb 8 --size Standard_DS2_v2 --ssh-key-value ~/.ssh/id_rsa.pub $ ls /dev/sd*
Reproduce before upgrading:
After upgradepowersj@cloud-init-test-powersj-1:/var/log$ ls /dev/sd* No error messages. |
Launchpad user Launchpad Janitor(janitor) wrote on 2017-06-27T15:51:34.880334+00:00 This bug was fixed in the package cloud-init - 0.7.9-153-g16a7302f-0ubuntu1~17.04.1 cloud-init (0.7.9-153-g16a7302f-0ubuntu1~17.04.1) zesty-proposed; urgency=medium
-- Scott Moser smoser@ubuntu.com Fri, 26 May 2017 16:14:09 -0400 |
Launchpad user Steve Langasek(vorlon) wrote on 2017-06-27T15:52:56.116246+00:00 The verification of the Stable Release Update for cloud-init 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 user Launchpad Janitor(janitor) wrote on 2017-06-27T15:54:02.062609+00:00 This bug was fixed in the package cloud-init - 0.7.9-153-g16a7302f-0ubuntu1~16.10.1 cloud-init (0.7.9-153-g16a7302f-0ubuntu1~16.10.1) yakkety-proposed; urgency=medium
-- Scott Moser smoser@ubuntu.com Fri, 26 May 2017 16:08:21 -0400 |
Launchpad user Launchpad Janitor(janitor) wrote on 2017-06-27T15:54:45.867129+00:00 This bug was fixed in the package cloud-init - 0.7.9-153-g16a7302f-0ubuntu1~16.04.1 cloud-init (0.7.9-153-g16a7302f-0ubuntu1~16.04.1) xenial-proposed; urgency=medium
-- Scott Moser smoser@ubuntu.com Fri, 26 May 2017 15:58:48 -0400 |
Launchpad user Scott Moser(smoser) wrote on 2017-09-23T02:33:07.250109+00:00 This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New Thank you. |
This bug was originally filed in Launchpad as LP: #1692087
Launchpad details
Launchpad user Scott Moser(smoser) wrote on 2017-05-19T18:54:46.694358+00:00
=== Begin SRU Template ===
[Impact]
The disk setup module (disk_setup) of cloud-init had several issues
when dealing with GPT formatted devices. The result was that the user
didn't get expected behavior if they were requesting GPT disk labels
or if the disk present already had a GPT label.
[Test Case]
1.) launch an instance with a second disk "/dev/vdb".
This can be done on openstack or azure.
2.) write a config to system.
$ sudo tee /etc/cloud/cloud.cfg.d/disk-setup.cfg <EOF
#cloud-config
disk_setup:
/dev/vdb:
table_type: gpt
layout: [66, [33, 82]]
overwrite: True
fs_setup:
- device: /dev/vdb
partition: 1
filesystem: ext4
- device: /dev/vdb
partition: 2
filesystem: swap
mounts:
- ["/dev/vdb1", "/mnt"]
EOF
Partition the second disk with a gpt partition table.
download a paritioning tool and use it.
$ wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bugs/lp-1686514/disk-setup -O disk-setup
# format /dev/vdb with GPT disk label and 2 partitions.
$ sudo LABEL=gpt ./disk-setup ntfs2 /dev/vdb
remove state from the instance and reboot. We expect that the desired
partitioning will be done and the mount written and used on reboot.
$ sudo rm -Rf /var/lib/cloud/ /var/log/cloud-init*
$ sudo reboot
$ grep vdb /proc/mounts
$ grep mnt /etc/fstab
$ sfdisk -l /dev/vdb
[Regression Potential]
Regressions will be limited to places where the disk_setup module is used.
That is
a.) Azure (by default on new instances or re-deployed instance)
b.) instances with custom user-data or system configuration.
[Other Info]
Upstream commit at
https://git.launchpad.net/cloud-init/commit/?id=3507b59eaa4
=== End SRU Template ===
As reported in bug 1686514 (comment 11), there is a bug in the code
that determines if a device layout is "the same" and will thus be re-used.
Even when functional, this code has some serious shortcomings:
a.) it does not check sizes at all, only partition types
b.) it does not check the partition table correctly
The bug to fix here is simply some issues with its usage of sgdisk.
* 'sgdisk -p' was being used to determine the size of a disk.
this can fail if it believes there is a bad gpt partition table.
* parsing of sgdisk -p output assumed that the 'name' of the partition
type would not have any spaces (Microsoft basic data)
* interaction with sgdisk did not realize that sgdisk wants input
of '8300' rather than '83'.
Related bugs:
* bug 1686514: Azure: cloud-init does not handle reformatting GPT partition ephemeral disks
* bug 1691489: fstab entries written by cloud-config may not be mounted
The text was updated successfully, but these errors were encountered: