Configdrive writing script fails for gpt devices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ironic-lib |
Fix Released
|
Undecided
|
Vladyslav Drok | ||
ironic-python-agent |
Fix Released
|
Undecided
|
Vladyslav Drok |
Bug Description
Here is a piece of log describing the problem:
2016-10-13 11:50:14.086 420 ERROR root [-] Command failed: prepare_image, error: Error writing configdrive to device: Writing configdrive to device /dev/vda failed with exit code 1. stdout: fix the GPT to use all of the space (an extra 22978560 blocks) or continue with
copy_configdriv
The operation has completed successfully.
copy_configdriv
Information: Moved requested sector from 22937566 to 22935552 in
order to align on 2048-sector boundaries.
The operation has completed successfully.
copy_configdriv
copy_configdriv
. stderr: Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)?
Warning: Not all of the space available to /dev/vda appears to be used, you can fix the GPT to use all of the space (an extra 22978560 blocks) or continue with the current setting?
dd: failed to open '/dev/vda2048': Invalid argument
.
2016-10-13 11:50:14.086 420 ERROR root Traceback (most recent call last):
2016-10-13 11:50:14.086 420 ERROR root File "/usr/local/
2016-10-13 11:50:14.086 420 ERROR root File "/usr/local/
2016-10-13 11:50:14.086 420 ERROR root File "/usr/local/
2016-10-13 11:50:14.086 420 ERROR root ConfigDriveWrit
2016-10-13 11:50:14.086 420 ERROR root copy_configdriv
2016-10-13 11:50:14.086 420 ERROR root The operation has completed successfully.
2016-10-13 11:50:14.086 420 ERROR root copy_configdriv
2016-10-13 11:50:14.086 420 ERROR root Information: Moved requested sector from 22937566 to 22935552 in
2016-10-13 11:50:14.086 420 ERROR root order to align on 2048-sector boundaries.
2016-10-13 11:50:14.086 420 ERROR root The operation has completed successfully.
2016-10-13 11:50:14.086 420 ERROR root copy_configdriv
2016-10-13 11:50:14.086 420 ERROR root copy_configdriv
2016-10-13 11:50:14.086 420 ERROR root . stderr: Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)?
2016-10-13 11:50:14.086 420 ERROR root Warning: Not all of the space available to /dev/vda appears to be used, you can fix the GPT to use all of the space (an extra 22978560 blocks) or continue with the current setting?
2016-10-13 11:50:14.086 420 ERROR root dd: failed to open '/dev/vda2048': Invalid argument
2016-10-13 11:50:14.086 420 ERROR root .
2016-10-13 11:50:14.086 420 ERROR root
The reason of this seems to be incorrect commands in the bash script.
Apart from that, if doing dd right after creating a partition, it may fail like this:
dd if=/tmp/configdrive of=/dev/vda2 bs=64K oflag=direct
dd: failed to open '/dev/vda2': Invalid argument
And partprobe may not help in this case.
Changed in ironic-python-agent: | |
assignee: | nobody → Vladyslav Drok (vdrok) |
description: | updated |
Changed in ironic-lib: | |
assignee: | nobody → Vladyslav Drok (vdrok) |
Fix proposed to branch: master /review. openstack. org/385957
Review: https:/