Skip to content

Commit

Permalink
test: wait until the VM is running before a poweroff
Browse files Browse the repository at this point in the history
On RHEL 10 there is seems to be a race where the machine is powered off
when it isn't fully running causing an libvirt error which in turns
causes the test to flake.
  • Loading branch information
jelly committed Jan 16, 2025
1 parent de52680 commit 90a3dee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/check-machines-create
Original file line number Diff line number Diff line change
Expand Up @@ -2246,6 +2246,7 @@ vnc_password= "{vnc_passwd}"
# Wait for virt-install to define the VM and then stop it,
# otherwise we get 'domain is ready being removed' error
testlib.wait(lambda: "VmNotInstalled" in m.execute("virsh list --persistent"), delay=3)
b.wait_in_text("#vm-VmNotInstalled-system-state", "Running")
logfile = "/var/log/libvirt/qemu/VmNotInstalled.log"
m.execute(f"> {logfile}") # clear logfile
self.performAction("VmNotInstalled", "forceOff", checkExpectedState=False)
Expand Down

0 comments on commit 90a3dee

Please sign in to comment.