diff options
| author | Jay Faulkner <jay@jvf.cc> | 2015-03-19 11:25:35 -0700 |
|---|---|---|
| committer | Jay Faulkner <jay@jvf.cc> | 2015-03-19 11:25:35 -0700 |
| commit | 79790171bc76207787873e58561b00652e8875c6 (patch) | |
| tree | 779c848d4026d5bd0e72ac662f37a2e39e67bfd5 /ironic_python_agent/shell | |
| parent | a17c82428842fe4994977ed6896bc99da8acf41a (diff) | |
| download | ironic-python-agent-79790171bc76207787873e58561b00652e8875c6.tar.gz | |
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
Diffstat (limited to 'ironic_python_agent/shell')
| -rwxr-xr-x | ironic_python_agent/shell/copy_configdrive_to_disk.sh | 6 |
1 files changed, 6 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 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 |
