From 3349eeb1069db3eb364c7d58230675a290258514 Mon Sep 17 00:00:00 2001 From: Gregory Giguashvili Date: Sat, 15 Jun 2024 17:37:41 +0000 Subject: [PATCH] Fix remove_vm function to keep info files when not fully deleted --- test/bin/scenario.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/bin/scenario.sh b/test/bin/scenario.sh index 56da244600..2eca4ac1de 100755 --- a/test/bin/scenario.sh +++ b/test/bin/scenario.sh @@ -647,14 +647,14 @@ remove_vm() { # Remove the pool directory # ShellCheck: Using "${var:?}" to ensure this never expands to '/*' rm -rf "${VM_DISK_BASEDIR:?}/${vm_pool_name}" + + # Remove the info file so something processing the VMs does not + # assume the file exists. This is most useful in a local setting. + rm -rf "${SCENARIO_INFO_DIR}/${SCENARIO}/vms/${vmname}" else # Remove VM disk files rm -f "${VM_DISK_BASEDIR}/${vm_pool_name}/*" fi - - # Remove the info file so something processing the VMs does not - # assume the file exists. This is most useful in a local setting. - rm -rf "${SCENARIO_INFO_DIR}/${SCENARIO}/vms/${vmname}" } # Configure the firewall in the VM based on the instructions in the documentation.