summaryrefslogtreecommitdiff
path: root/ironic_python_agent
diff options
context:
space:
mode:
Diffstat (limited to 'ironic_python_agent')
-rwxr-xr-xironic_python_agent/shell/copy_configdrive_to_disk.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/ironic_python_agent/shell/copy_configdrive_to_disk.sh b/ironic_python_agent/shell/copy_configdrive_to_disk.sh
index 8d6da02c..8b41cdca 100755
--- a/ironic_python_agent/shell/copy_configdrive_to_disk.sh
+++ b/ironic_python_agent/shell/copy_configdrive_to_disk.sh
@@ -37,6 +37,10 @@ DEVICE="$2"
[[ -f $CONFIGDRIVE ]] || usage "$CONFIGDRIVE (CONFIGDRIVE) is not a regular file"
[[ -b $DEVICE ]] || usage "$DEVICE (DEVICE) is not a block device"
+# We need to run partprobe to ensure all partitions are visible so the
+# following blkid command returns partitions just imaged to the device
+/sbin/partprobe $DEVICE || fail "running partprobe against $DEVICE"
+
# Check for preexisting partition for configdrive
EXISTING_PARTITION=`/sbin/blkid -l -o device $DEVICE -t LABEL=config-2`
if [[ $? == 0 ]]; then