Skip to content

Commit bc13adf

Browse files
derekhigginsdtantsur
authored andcommitted
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 (cherry picked from commit 9c3fbfd)
1 parent b3f489c commit bc13adf

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ironic_python_agent/shell/write_image.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ DEVICE_SECTORS_COUNT=`blockdev --getsz $DEVICE`
4343
dd bs=512 if=/dev/zero of=$DEVICE count=33
4444
dd bs=512 if=/dev/zero of=$DEVICE count=33 seek=$((${DEVICE_SECTORS_COUNT} - 33))
4545
sgdisk -Z $DEVICE
46+
udevadm settle
4647

4748
log "Imaging $IMAGEFILE to $DEVICE"
4849

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
Adds a call to "udevadm settle" in write_image.sh.
5+
After GPT and MBR are destroyed systemd-udevd gets triggered
6+
which may hold /dev/sda open preventing qemu-img from writting
7+
its image.

0 commit comments

Comments
 (0)