Skip to content

Commit 7979017

Browse files
committed
Call partprobe+partx before writing configdrive
partx -u $DEVICE doesn't work in some cases, but partprobe $DEVICE fails in virtual environments (like devstack). For now, run both commands and ignore partprobe failures. Moving forward, this shell should be factored into python and share code with the other partition-modifying code added this cycle. Change-Id: I7e4c010e260be2a23dcc894bc0c1b30aea949084 Partial-bug: 1433812
1 parent a17c824 commit 7979017

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ironic_python_agent/shell/copy_configdrive_to_disk.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ DEVICE="$2"
4545
# following blkid command returns partitions just imaged to the device
4646
partx -u $DEVICE || fail "running partx -u $DEVICE"
4747

48+
# todo(jayf): partx -u doesn't work in all cases, but partprobe fails in
49+
# devstack. We run both commands now as a temporary workaround for bug 1433812
50+
# long term, this should all be refactored into python and share code with
51+
# the other partition-modifying code in the agent.
52+
partprobe $DEVICE || true
53+
4854
# Check for preexisting partition for configdrive
4955
EXISTING_PARTITION=`/sbin/blkid -l -o device $DEVICE -t LABEL=config-2`
5056
if [[ $? == 0 ]]; then

0 commit comments

Comments
 (0)