diff options
| author | Derek Higgins <derekh@redhat.com> | 2021-04-20 17:13:18 +0100 |
|---|---|---|
| committer | Derek Higgins <derekh@redhat.com> | 2021-04-20 17:48:46 +0100 |
| commit | 9c3fbfd000a323db4d57bf57cf50e83c3fb6681b (patch) | |
| tree | fd2e44cdd374dddbe4bedd97789d1b277299c12b /ironic_python_agent/shell | |
| parent | c72997d8d0c80f29fcaf452092f1e66e7270a427 (diff) | |
| download | ironic-python-agent-9c3fbfd000a323db4d57bf57cf50e83c3fb6681b.tar.gz | |
Add a call to "udevadm settle" in write_image.sh
After GPT and MBR are destroyed systemd-udevd gets triggered
which may hold /dev/sda open preventing qemu-img from writting
its image.
Story: 2008830
Task: 42312
Change-Id: I6105192a16fcb7f6898910e8d0ab824d731d491d
Diffstat (limited to 'ironic_python_agent/shell')
| -rwxr-xr-x | ironic_python_agent/shell/write_image.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ironic_python_agent/shell/write_image.sh b/ironic_python_agent/shell/write_image.sh index a89c68df..bcd6bfd3 100755 --- a/ironic_python_agent/shell/write_image.sh +++ b/ironic_python_agent/shell/write_image.sh @@ -43,6 +43,7 @@ DEVICE_SECTORS_COUNT=`blockdev --getsz $DEVICE` dd bs=512 if=/dev/zero of=$DEVICE count=33 dd bs=512 if=/dev/zero of=$DEVICE count=33 seek=$((${DEVICE_SECTORS_COUNT} - 33)) sgdisk -Z $DEVICE +udevadm settle log "Imaging $IMAGEFILE to $DEVICE" |
