tests/ostree-simplified-installer: destroy VM when installation is stuck
This test get stuck randomly on centos-stream-8 and is making the CI unreliable. Adding hard wait limit and destroying the VM afterwards helps the test get unstuck and continue as expected. See https://github.com/osbuild/osbuild-composer/issues/2413 for details.
This commit is contained in:
parent
fbefd432c1
commit
b639a44899
1 changed files with 14 additions and 2 deletions
|
|
@ -495,9 +495,15 @@ sudo virt-install --name="${IMAGE_KEY}-http"\
|
|||
--boot uefi,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd,loader_secure=no \
|
||||
--nographics \
|
||||
--noautoconsole \
|
||||
--wait=-1 \
|
||||
--wait=15 \
|
||||
--noreboot
|
||||
|
||||
# Installation can get stuck, destroying VM helps
|
||||
# See https://github.com/osbuild/osbuild-composer/issues/2413
|
||||
if [[ $(sudo virsh domstate "${IMAGE_KEY}-http") == "running" ]]; then
|
||||
sudo virsh destroy "${IMAGE_KEY}-http"
|
||||
fi
|
||||
|
||||
# Start VM.
|
||||
greenprint "💻 Start HTTP BOOT VM"
|
||||
sudo virsh start "${IMAGE_KEY}-http"
|
||||
|
|
@ -621,9 +627,15 @@ sudo virt-install --name="${IMAGE_KEY}-fdosshkey"\
|
|||
--boot uefi,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd,loader_secure=no \
|
||||
--nographics \
|
||||
--noautoconsole \
|
||||
--wait=-1 \
|
||||
--wait=15 \
|
||||
--noreboot
|
||||
|
||||
# Installation can get stuck, destroying VM helps
|
||||
# See https://github.com/osbuild/osbuild-composer/issues/2413
|
||||
if [[ $(sudo virsh domstate "${IMAGE_KEY}-fdosshkey") == "running" ]]; then
|
||||
sudo virsh destroy "${IMAGE_KEY}-fdosshkey"
|
||||
fi
|
||||
|
||||
# Start VM.
|
||||
greenprint "💻 Start UEFI VM"
|
||||
sudo virsh start "${IMAGE_KEY}-fdosshkey"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue