Skip to content

Commit d159aec

Browse files
committed
Fix: partitions recently imaged not being detected
When we have just written out a whole disk image, if we do not run partprobe none of the new partitions show up in blkid, therefore even images with a built-in configdrive partition will have one created Change-Id: I6ec98dc237b42bfe94ce79cf84d155332335c9f6
1 parent d82b8c6 commit d159aec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ironic_python_agent/shell/copy_configdrive_to_disk.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ DEVICE="$2"
3737
[[ -f $CONFIGDRIVE ]] || usage "$CONFIGDRIVE (CONFIGDRIVE) is not a regular file"
3838
[[ -b $DEVICE ]] || usage "$DEVICE (DEVICE) is not a block device"
3939

40+
# We need to run partprobe to ensure all partitions are visible so the
41+
# following blkid command returns partitions just imaged to the device
42+
/sbin/partprobe $DEVICE || fail "running partprobe against $DEVICE"
43+
4044
# Check for preexisting partition for configdrive
4145
EXISTING_PARTITION=`/sbin/blkid -l -o device $DEVICE -t LABEL=config-2`
4246
if [[ $? == 0 ]]; then

0 commit comments

Comments
 (0)