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
(cherry picked from commit 9c3fbfd000a323db4d57bf57cf50e83c3fb6681b)
changes/48/787848/1
Derek Higgins 3 weeks ago
committed by Dmitry Tantsur
parent
commit
bc13adfa49
2 changed files with 8 additions and 0 deletions
  1. +1
    -0
      ironic_python_agent/shell/write_image.sh
  2. +7
    -0
      releasenotes/notes/udevadm-settle-9d3e5f1f20211857.yaml

+ 1
- 0
ironic_python_agent/shell/write_image.sh View File

@ -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
- 0
releasenotes/notes/udevadm-settle-9d3e5f1f20211857.yaml View File

@ -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