Undefine domains with --managed-save option
authorMartin Schwenke <martin@meltin.net>
Tue, 24 May 2016 03:46:16 +0000 (13:46 +1000)
committerAmitay Isaacs <amitay@ozlabs.org>
Wed, 9 May 2018 09:42:09 +0000 (19:42 +1000)
Just in case previous version was automatically saved.

Signed-off-by: Martin Schwenke <martin@meltin.net>
autocluster

index dafc6058878aaa7d8c896e8b3cfb875e108acefe..cb1997621d69dd95176f37f1de0cbfa94fec6c51 100755 (executable)
@@ -210,7 +210,8 @@ list_all_virsh_domains ()
 
 virsh_cluster ()
 {
-    local command="$1"
+       local command="$1"
+       shift
 
     local nodes=$(list_all_cluster_nodes)
     local domains=$(list_all_virsh_domains)
@@ -223,7 +224,7 @@ virsh_cluster ()
     local ret=0
     local n
     for n in $nodes ; do
-       virsh "$command" "$n" 2>&1 || ret=$?
+       virsh "$command" "$n" "$@" 2>&1 || ret=$?
     done
 
     return $ret
@@ -601,7 +602,7 @@ cluster_undefine ()
     announce "cluster undefine \"${CLUSTER}\""
     [ -n "$CLUSTER" ] || die "\$CLUSTER not set"
 
-    virsh_cluster undefine || true
+    virsh_cluster undefine --managed-save || true
 }
 
 cluster_update_hosts ()