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
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