growpart failed in ppc64el guest
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | gdisk (Ubuntu) |
High
|
William Grant | ||
| | Precise |
High
|
William Grant | ||
| | Trusty |
High
|
William Grant | ||
| | Utopic |
High
|
William Grant | ||
| | Vivid |
High
|
William Grant | ||
| | Wily |
High
|
William Grant | ||
Bug Description
growpart uses sgdisk to resize gpt partition tables and then
'partx --update' to inform the kernel of those changes.
an example usage of sgdisk ends up looking like this:
# Modify the partition table. all in one go (order is important!):
# - move the GPT backup header to the end of the disk
# - delete the partition
# - recreate the partition with the new size
# - set the partition code
# - set the partition GUID
# - set the partition name
sgdisk --move-
--typecode=
--partition
'--
We're seeing an issue on ppc64el systems with gpt partition tables.
This reproduces only occasionally.
Note, when growpart runs, the partition it is updating is mounted.
It does this to accomodate space at the end (a grow virtual disk).
The failure we saw was this (we only have logs), and subsequent run of
'growpart' finished fine:
command: growpart /dev/sda 1
exit code: 2
stdout:
FAILED: disk=/dev/sda partition=1: failed to repartition
stderr:
failed [sgdisk_mod:4] sgdisk --move-
--
--
--
Could not create partition 1 from 40532396646334464 to 0
Could not change partition 1's type code to 0FC63DAF-
Unable to set partition 1's name to 'Linux filesystem'!
Error encountered; not saving changes.
***** WARNING: Resize failed, attempting to revert ******
***** Appears to have gone OK ****
Note there the odd '1 from 40532396646334464 to 0'.
[Test Case]
On a ppc64el system with a sacrificial GPT disk (because it will blow away your /dev/sda1):
while sudo sgdisk --delete=1 --new=1:
This will normally fail after less than 20 iterations, usually like this:
Could not create partition 1 from 40532396646334464 to 0
[Regression Potential]
Very minimal. The patch just initialises an uninitialised variable, which happens to usually (and on x86 apparently always) contain a benign value.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: cloud-guest-utils 0.27-0ubuntu7
ProcVersionSign
Uname: Linux 3.13.0-12-generic ppc64le
ApportVersion: 2.13.2-0ubuntu5
Architecture: ppc64el
Date: Wed Feb 26 14:50:02 2014
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-utils
UpgradeStatus: No upgrade log present (probably fresh install)
| Scott Moser (smoser) wrote : | #1 |
| Scott Moser (smoser) wrote : | #2 |
| Scott Moser (smoser) wrote : | #3 |
Sent email to upstream mailing list at http://
| Changed in cloud-utils (Ubuntu): | |
| importance: | Undecided → High |
| Changed in gdisk (Ubuntu): | |
| importance: | Undecided → High |
| Scott Moser (smoser) wrote : | #4 |
Well, for the first time in quite a while, I saw this on a 20140407 image.
There were other things changed though, this system:
* had a 120G root (versus normal ~10G)
* is a power 8 host
* had 4 cores not 2
relavent output (cleaned from /var/log/
2014-04-07 15:19:51,256 - util.py[WARNING]: Failed: growpart /dev/sda 1
2014-04-07 15:19:51,257 - util.py[DEBUG]: Failed: growpart /dev/sda 1
Traceback (most recent call last):
File "/usr/lib/
util.
File "/usr/lib/
cmd=args)
ProcessExecutio
Command: ['growpart', '/dev/sda', '1']
Exit code: 2
Reason: -
Stdout:
FAILED: disk=/dev/sda partition=1: failed to repartition
Warning! Current disk size doesn't match that of the backup!
Adjusting sizes to match, but subsequent problems are possible!
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
Stderr:
failed [sgdisk_mod:4] sgdisk --move-
--new=
--partition
--change-
Could not create partition 1 from 40532396646334464 to 0
Could not change partition 1's type code to 0FC63DAF-
Unable to set partition 1's name to ''!
Error encountered; not saving changes.
***** WARNING: Resize failed, attempting to revert ******
***** Appears to have gone OK ****
(remember 'The operation has completed successfully' is the revert operation).
| Launchpad Janitor (janitor) wrote : | #5 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in cloud-utils (Ubuntu): | |
| status: | New → Confirmed |
| Changed in gdisk (Ubuntu): | |
| status: | New → Confirmed |
| Changed in gdisk (Ubuntu): | |
| assignee: | nobody → William Grant (wgrant) |
| status: | Confirmed → In Progress |
| William Grant (wgrant) wrote : | #7 |
Fixed in https:/
Will sort out trusty->wily uploads.
| Changed in cloud-utils (Ubuntu): | |
| status: | Confirmed → Invalid |
| no longer affects: | cloud-utils (Ubuntu) |
| Changed in gdisk (Ubuntu Trusty): | |
| assignee: | nobody → William Grant (wgrant) |
| Changed in gdisk (Ubuntu Utopic): | |
| assignee: | nobody → William Grant (wgrant) |
| Changed in gdisk (Ubuntu Vivid): | |
| assignee: | nobody → William Grant (wgrant) |
| Changed in gdisk (Ubuntu Trusty): | |
| importance: | Undecided → High |
| Changed in gdisk (Ubuntu Utopic): | |
| importance: | Undecided → High |
| Changed in gdisk (Ubuntu Vivid): | |
| importance: | Undecided → High |
| Changed in gdisk (Ubuntu Trusty): | |
| status: | New → In Progress |
| Changed in gdisk (Ubuntu Utopic): | |
| status: | New → In Progress |
| Changed in gdisk (Ubuntu Vivid): | |
| status: | New → In Progress |
| Changed in gdisk (Ubuntu Precise): | |
| assignee: | nobody → William Grant (wgrant) |
| importance: | Undecided → High |
| status: | New → In Progress |
| description: | updated |
Hello Scott, or anyone else affected,
Accepted gdisk into precise-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
| Changed in gdisk (Ubuntu Precise): | |
| status: | In Progress → Fix Committed |
| tags: | added: verification-needed |
| Changed in gdisk (Ubuntu Trusty): | |
| status: | In Progress → Fix Committed |
| Adam Conrad (adconrad) wrote : | #9 |
Hello Scott, or anyone else affected,
Accepted gdisk into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
| Changed in gdisk (Ubuntu Vivid): | |
| status: | In Progress → Fix Committed |
| Adam Conrad (adconrad) wrote : | #10 |
Hello Scott, or anyone else affected,
Accepted gdisk into vivid-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
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-
Further information regarding the verification process can be found at https:/
| Changed in gdisk (Ubuntu Utopic): | |
| status: | In Progress → Fix Committed |
| Changed in gdisk (Ubuntu Wily): | |
| status: | In Progress → Fix Committed |
| William Grant (wgrant) wrote : | #11 |
Copied trusty-proposed to utopic-proposed.
| tags: | added: verification-done-trusty |
| Launchpad Janitor (janitor) wrote : | #12 |
This bug was fixed in the package gdisk - 1.0.0-2ubuntu1
---------------
gdisk (1.0.0-2ubuntu1) wily; urgency=medium
* debian/patches/bug-1285197.diff: Don't leave suffix uninitialised when
none was passed to IeeeToInt. Fixes incorrect partition boundaries and
other failures on ppc64el and possibly other architectures. (LP: #1285197)
-- William Grant <email address hidden> Sat, 20 Jun 2015 10:04:18 +1000
| Changed in gdisk (Ubuntu Wily): | |
| status: | Fix Committed → Fix Released |
| tags: |
added: verification-done-precise verification-done-utopic verification-done-vivid removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #13 |
This bug was fixed in the package gdisk - 0.8.1-1ubuntu0.1
---------------
gdisk (0.8.1-1ubuntu0.1) precise-proposed; urgency=medium
* debian/patches/bug-1285197.diff: Don't leave suffix uninitialised when
none was passed to IeeeToInt. Fixes incorrect partition boundaries and
other failures on ppc64el and possibly other architectures. (LP: #1285197)
-- William Grant <email address hidden> Sat, 20 Jun 2015 10:13:21 +1000
| Changed in gdisk (Ubuntu Precise): | |
| status: | Fix Committed → Fix Released |
| Adam Conrad (adconrad) wrote : Update Released | #14 |
The verification of the Stable Release Update for gdisk 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 Janitor (janitor) wrote : | #15 |
This bug was fixed in the package gdisk - 0.8.8-1ubuntu0.1
---------------
gdisk (0.8.8-1ubuntu0.1) trusty-proposed; urgency=medium
* debian/patches/bug-1285197.diff: Don't leave suffix uninitialised when
none was passed to IeeeToInt. Fixes incorrect partition boundaries and
other failures on ppc64el and possibly other architectures. (LP: #1285197)
-- William Grant <email address hidden> Fri, 19 Jun 2015 19:34:36 +1000
| Changed in gdisk (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| Launchpad Janitor (janitor) wrote : | #16 |
This bug was fixed in the package gdisk - 0.8.10-2ubuntu0.1
---------------
gdisk (0.8.10-2ubuntu0.1) vivid-proposed; urgency=medium
* debian/patches/bug-1285197.diff: Don't leave suffix uninitialised when
none was passed to IeeeToInt. Fixes incorrect partition boundaries and
other failures on ppc64el and possibly other architectures. (LP: #1285197)
-- William Grant <email address hidden> Sat, 20 Jun 2015 10:10:22 +1000
| Changed in gdisk (Ubuntu Vivid): | |
| status: | Fix Committed → Fix Released |
| Launchpad Janitor (janitor) wrote : | #17 |
This bug was fixed in the package gdisk - 0.8.8-1ubuntu0.1
---------------
gdisk (0.8.8-1ubuntu0.1) trusty-proposed; urgency=medium
* debian/patches/bug-1285197.diff: Don't leave suffix uninitialised when
none was passed to IeeeToInt. Fixes incorrect partition boundaries and
other failures on ppc64el and possibly other architectures. (LP: #1285197)
-- William Grant <email address hidden> Fri, 19 Jun 2015 19:34:36 +1000
| Changed in gdisk (Ubuntu Utopic): | |
| status: | Fix Committed → Fix Released |
| Rod Smith (rodsmith) wrote : | #18 |
FWIW, this is fixed upstream (in GPT fdisk 1.0.1), and bug 1514400 now requests an update to that version.


To generally reproduce what is going on here via use of /dev/loop0, we can
do:
imgurl="http:// cloud-images. ubuntu. com/trusty/ current/ trusty- server- cloudimg- ppc64el- gpt1.img" "${imgurl# #*/}"
imgdist=
wget "$imgurl" -O "$imgdist"
qemu-img convert -O raw "$imgdist" my.img
qemu-img resize my.img 10G
LODEV="/dev/loop0"
sudo losetup $LODEV "$PWD/my.img"
mkdir ./mp
sudo mount ${LODEV}p1 ./mp
sudo growpart "$LODEV" 1
sudo umount ./mp
sudo losetup -d "$LODEV"