From 79790171bc76207787873e58561b00652e8875c6 Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Thu, 19 Mar 2015 11:25:35 -0700 Subject: 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 --- ironic_python_agent/shell/copy_configdrive_to_disk.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ironic_python_agent/shell') diff --git a/ironic_python_agent/shell/copy_configdrive_to_disk.sh b/ironic_python_agent/shell/copy_configdrive_to_disk.sh index ce0fcc17..1095a6d0 100755 --- a/ironic_python_agent/shell/copy_configdrive_to_disk.sh +++ b/ironic_python_agent/shell/copy_configdrive_to_disk.sh @@ -45,6 +45,12 @@ DEVICE="$2" # following blkid command returns partitions just imaged to the device partx -u $DEVICE || fail "running partx -u $DEVICE" +# todo(jayf): partx -u doesn't work in all cases, but partprobe fails in +# devstack. We run both commands now as a temporary workaround for bug 1433812 +# long term, this should all be refactored into python and share code with +# the other partition-modifying code in the agent. +partprobe $DEVICE || true + # Check for preexisting partition for configdrive EXISTING_PARTITION=`/sbin/blkid -l -o device $DEVICE -t LABEL=config-2` if [[ $? == 0 ]]; then -- cgit v1.2.1