Skip to content
Snippets Groups Projects
Commit be48887b authored by Josip Rodin's avatar Josip Rodin
Browse files

Document the libvirt recovery procedure on failed vagrant destroys

This happens on seemingly innocuous cancel pipeline clicks,
cf. gitlab-org/gitlab#15603

The remediation won't necessarily work, as the gitlab-runner user may
not be actually allowed to do all this, just triggering this so I can
start sniffing out virsh commands to do so
parent b1dbefee
No related branches found
No related tags found
No related merge requests found
Pipeline #426892462 failed
......@@ -34,8 +34,19 @@
else
vagrant box add --provider $VAGRANT_PROVIDER $VAGRANT_BOX
fi
if ! vagrant destroy $TEST_HOST -f; then
if [ "$VAGRANT_PROVIDER" = "libvirt" ]; then
libvirt_vm=ansible-playbooks_$TEST_HOST
virsh destroy $libvirt_vm
virsh undefine $libvirt_vm
rm ~libvirt-qemu/images/$libvirt_vm.img
systemctl restart libvirtd
else
echo "Aiee, vagrant destruction of $TEST_HOST failed with $VAGRANT_PROVIDER"
exit 1
fi
fi
set +x
- "vagrant destroy $TEST_HOST -f || true"
- |
if [ -n "$VAGRANT_BOX_NEEDS_CHECKED_OUT_BRANCH" ]; then
echo "Box |$VAGRANT_BOX_NEEDS_CHECKED_OUT_BRANCH| needs a branch"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment