From 8f2b6d709448fa9be6538bbc70235b6900eb7c63 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 6 Oct 2020 15:31:14 +0200 Subject: [PATCH] testing: Ignore hosts that are not running during shutdown This allows properly terminating the environment if a host has crashed or was terminated manually for some reason. --- testing/stop-testing | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testing/stop-testing b/testing/stop-testing index 8abf5f223..6f705b812 100755 --- a/testing/stop-testing +++ b/testing/stop-testing @@ -24,7 +24,12 @@ done for host in $STRONGSWANHOSTS do log_action "Guest $host" - execute "virsh shutdown $host" + + if running_any $host; then + execute "virsh shutdown $host" + else + echo_warn "...not running" + fi rm -f $VIRTIMGSTORE/$host.$IMGEXT done