Browse Source

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
changes/68/787268/1
Derek Higgins 7 months ago
parent
commit
9c3fbfd000
  1. 1
      ironic_python_agent/shell/write_image.sh
  2. 7
      releasenotes/notes/udevadm-settle-9d3e5f1f20211857.yaml

1
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"

7
releasenotes/notes/udevadm-settle-9d3e5f1f20211857.yaml

@ -0,0 +1,7 @@
---
fixes:
- |
Adds 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.
Loading…
Cancel
Save