Blame SOURCES/bz1180506-3-Keep-cluster-quorate-during-destruction-as-long-as-possible.patch

337c54
From 5885c90faca010e3bceb3028638629fb69dca36e Mon Sep 17 00:00:00 2001
337c54
From: Tomas Jelinek <tojeline@redhat.com>
337c54
Date: Tue, 20 Jan 2015 10:23:01 +0100
337c54
Subject: [PATCH] Keep cluster quorate during destruction as long as possible
337c54
337c54
---
337c54
 pcs/cluster.py | 7 +++++++
337c54
 1 file changed, 7 insertions(+)
337c54
337c54
diff --git a/pcs/cluster.py b/pcs/cluster.py
337c54
index e4829f1..038bc31 100644
337c54
--- a/pcs/cluster.py
337c54
+++ b/pcs/cluster.py
337c54
@@ -801,6 +801,13 @@ def disable_cluster_nodes(nodes):
337c54
 
337c54
 def destroy_cluster(argv):
337c54
     if len(argv) > 0:
337c54
+        # stop pacemaker and resources while cluster is still quorate
337c54
+        threads = dict()
337c54
+        for node in argv:
337c54
+            threads[node] = NodeStopPacemakerThread(node)
337c54
+        error_list = utils.run_node_threads(threads)
337c54
+        # proceed with destroy regardless of errors
337c54
+        # destroy will stop any remaining cluster daemons
337c54
         threads = dict()
337c54
         for node in argv:
337c54
             threads[node] = NodeDestroyThread(node)
337c54
-- 
337c54
1.9.1
337c54