Workaround vagrant-libvirt bug destroying VMs 90/4690/1
authorTodd Malsbary <todd.malsbary@intel.com>
Tue, 8 Feb 2022 19:54:35 +0000 (11:54 -0800)
committerTodd Malsbary <todd.malsbary@intel.com>
Tue, 15 Feb 2022 16:38:34 +0000 (08:38 -0800)
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Change-Id: I88cc40a534e720b68d64f5c5a43e9e443d189919

ci/jjb/shell/bluval.sh
ci/jjb/shell/vagrant-verify.sh
doc/installation-guide.md
doc/quick-start.md

index 87d5845..bfb6ff6 100644 (file)
@@ -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
index 81fbf6c..76ed59b 100644 (file)
@@ -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
 
index f823b3d..8a7437d 100644 (file)
@@ -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/to<sub>r6.sh</sub>.
 
index 074baa3..e3495db 100644 (file)
@@ -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