From: Todd Malsbary Date: Tue, 8 Feb 2022 19:54:35 +0000 (-0800) Subject: Workaround vagrant-libvirt bug destroying VMs X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=7711f3f360a440a5d82120552bd3919287bc8e93;p=icn.git Workaround vagrant-libvirt bug destroying VMs Signed-off-by: Todd Malsbary Change-Id: I88cc40a534e720b68d64f5c5a43e9e443d189919 --- diff --git a/ci/jjb/shell/bluval.sh b/ci/jjb/shell/bluval.sh index 87d5845..bfb6ff6 100644 --- a/ci/jjb/shell/bluval.sh +++ b/ci/jjb/shell/bluval.sh @@ -10,7 +10,14 @@ git clone "https://gerrit.akraino.org/r/icn" ${WORKSPACE}/icn echo "[ICN] Bringing up test cluster" function clean_vm { pushd ${WORKSPACE}/icn - vagrant destroy -f + # TODO Vagrant has a known issue + # (https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371) + # destroying the VMs, so destroy them manually here + vagrant destroy -f jump + virsh -c qemu:///system destroy vm-machine-1 + virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1 + virsh -c qemu:///system destroy vm-machine-2 + virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2 popd } trap clean_vm EXIT diff --git a/ci/jjb/shell/vagrant-verify.sh b/ci/jjb/shell/vagrant-verify.sh index 81fbf6c..76ed59b 100644 --- a/ci/jjb/shell/vagrant-verify.sh +++ b/ci/jjb/shell/vagrant-verify.sh @@ -6,7 +6,14 @@ echo "---> vagrant-verify.sh" set -exuf -o pipefail function clean_vm {{ - vagrant destroy -f + # TODO Vagrant has a known issue + # (https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371) + # destroying the VMs, so destroy them manually here + vagrant destroy -f jump + virsh -c qemu:///system destroy vm-machine-1 + virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1 + virsh -c qemu:///system destroy vm-machine-2 + virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2 }} trap clean_vm EXIT diff --git a/doc/installation-guide.md b/doc/installation-guide.md index f823b3d..8a7437d 100644 --- a/doc/installation-guide.md +++ b/doc/installation-guide.md @@ -238,7 +238,7 @@ Metal Operator resources it uses into a Helm chart. ### Configuration -> NOTE:/ To assist in the migration of R5 and earlier release's use from +> NOTE: To assist in the migration of R5 and earlier release's use from > nodes.json and the Provisioning resource to the site YAML described > below, a helper script is provided at tools/migration/tor6.sh. diff --git a/doc/quick-start.md b/doc/quick-start.md index 074baa3..e3495db 100644 --- a/doc/quick-start.md +++ b/doc/quick-start.md @@ -18,6 +18,14 @@ TL;DR root@jump:/icn# make jump_server root@jump:/icn# make vm_cluster +> NOTE: vagrant destroy may fail due to +> https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371. The +> workaround is to destroy the machines manually +> +> $ virsh -c qemu:///system destroy vm-machine-1 +> $ virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1 +> $ virsh -c qemu:///system destroy vm-machine-2 +> $ virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2 ## Create the virtual environment