Blame SOURCES/bz1265425-01-Fix-for-crm_node-l-output-change.patch

71541a
From 2d28901bb2eac1329e935b0d7f8418a27c0b0067 Mon Sep 17 00:00:00 2001
71541a
From: Chris Feist <cfeist@redhat.com>
71541a
Date: Tue, 22 Sep 2015 17:19:37 -0500
71541a
Subject: [PATCH] Fix for crm_node -l output change
71541a
71541a
- crm_node -l now outputs a status after the node id and node name we
71541a
  now ignore lines where the 3rd field is "lost".
71541a
---
71541a
 pcs/utils.py | 5 +++--
71541a
 1 file changed, 3 insertions(+), 2 deletions(-)
71541a
71541a
diff --git a/pcs/utils.py b/pcs/utils.py
71541a
index 0b8d03f..88362b3 100644
71541a
--- a/pcs/utils.py
71541a
+++ b/pcs/utils.py
71541a
@@ -1706,8 +1706,9 @@ def getPacemakerNodesID(allow_failure=False):
71541a
 
71541a
     pm_nodes = {}
71541a
     for line in output.rstrip().split("\n"):
71541a
-        node_info = line.rstrip().split(" ",1)
71541a
-        pm_nodes[node_info[0]] = node_info[1]
71541a
+        node_info = line.rstrip().split(" ")
71541a
+        if len(node_info) <= 2 or node_info[2] != "lost":
71541a
+            pm_nodes[node_info[0]] = node_info[1]
71541a
 
71541a
     return pm_nodes
71541a
 
71541a
-- 
71541a
1.9.1
71541a