Growpart doesn't resize partition when using quotation marks in partition name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
diskimage-builder |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
It appears when diskimage-builder inserts quotation marks to the partition name, growpart in cloud-init can't resize that partition
```
growpart /dev/vda 2
attempt to resize /dev/vda failed. sfdisk output below:
| GPT PMBR size mismatch (5004927 != 41943039) will be corrected by w(rite).
| Backup files:
| PMBR (offset 0, size 512): /tmp/growpart.
| GPT Header (offset 512, size 512): /tmp/growpart.
| GPT Entries (offset 1024, size 16384): /tmp/growpart.
|
| Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
| Units: sectors of 1 * 512 = 512 bytes
| Sector size (logical/physical): 512 bytes / 512 bytes
| I/O size (minimum/optimal): 512 bytes / 512 bytes
| Disklabel type: gpt
| Disk identifier: 30CA77E6-
|
| Old situation:
|
| Device Start End Sectors Size Type
| /dev/vda1 2048 67583 65536 32M BIOS boot
| /dev/vda2 67584 5001215 4933632 2.4G Linux filesystem
|
| >>> Script header accepted.
| >>> Script header accepted.
| >>> Script header accepted.
| >>> Script header accepted.
| >>> Script header accepted.
| >>> line 7: unsupported command
|
| New situation:
| Disklabel type: gpt
| Disk identifier: 30CA77E6-
|
| Device Start End Sectors Size Type
| /dev/vda1 2048 67583 65536 32M BIOS boot
| /dev/vda2 67584 5001215 4933632 2.4G Linux filesystem
| Leaving.
|
FAILED: failed to resize
***** WARNING: Resize failed, attempting to revert ******
512+0 records in
512+0 records out
512 bytes copied, 0.00161046 s, 318 kB/s
512+0 records in
512+0 records out
512 bytes copied, 0.00136544 s, 375 kB/s
16384+0 records in
16384+0 records out
16384 bytes (16 kB, 16 KiB) copied, 0.0397953 s, 412 kB/s
***** Restore appears to have gone OK ****
```
When you edit `/block_
This is only happening with gpt right? This was fixed in https:/ /review. openstack. org/#/c/ 578265/ which will be in the next release.
We also got this fixed upstream (https:/ /github. com/karelzak/ util-linux/ issues/ 656)