Blame SOURCES/bz1269242-01-fix-displaying-cluster-config-when-cib-is-provided-a.patch

15f218
From 8696f5e4f072ac88a3e20b1b376ea8de823f7aa7 Mon Sep 17 00:00:00 2001
15f218
From: Tomas Jelinek <tojeline@redhat.com>
15f218
Date: Fri, 8 Jul 2016 12:20:59 +0200
15f218
Subject: [PATCH] fix displaying cluster config when cib is provided as a file
15f218
15f218
---
15f218
 pcs/config.py | 11 +++++++++--
15f218
 pcs/status.py |  8 +++++++-
15f218
 pcs/utils.py  | 13 +++++++------
15f218
 3 files changed, 23 insertions(+), 9 deletions(-)
15f218
15f218
diff --git a/pcs/config.py b/pcs/config.py
15f218
index 4659c5b..3d86b39 100644
15f218
--- a/pcs/config.py
15f218
+++ b/pcs/config.py
15f218
@@ -94,7 +94,14 @@ def config_show(argv):
15f218
     status.nodes_status(["config"])
15f218
     print()
15f218
     config_show_cib()
15f218
-    cluster.cluster_uidgid([], True)
15f218
+    if (
15f218
+        utils.is_rhel6()
15f218
+        or
15f218
+        (not utils.usefile and "--corosync_conf" not in utils.pcs_options)
15f218
+    ):
15f218
+        # with corosync 1 and cman, uid gid is part of cluster.conf file
15f218
+        # with corosync 2, uid gid is in a separate directory
15f218
+        cluster.cluster_uidgid([], True)
15f218
     if "--corosync_conf" in utils.pcs_options or not utils.is_rhel6():
15f218
         print()
15f218
         print("Quorum:")
15f218
@@ -113,8 +120,8 @@ def config_show_cib():
15f218
     print("Stonith Devices:")
15f218
     resource.resource_show([], True)
15f218
     print("Fencing Levels:")
15f218
-    print()
15f218
     stonith.stonith_level_show()
15f218
+    print()
15f218
 
15f218
     lib = utils.get_library_wrapper()
15f218
     constraint.location_show([])
15f218
diff --git a/pcs/status.py b/pcs/status.py
15f218
index 0e5e0e7..e1f367f 100644
15f218
--- a/pcs/status.py
15f218
+++ b/pcs/status.py
15f218
@@ -66,7 +66,13 @@ def full_status():
15f218
     if utils.stonithCheck():
15f218
         print("WARNING: no stonith devices and stonith-enabled is not false")
15f218
 
15f218
-    if not utils.is_rhel6() and utils.corosyncPacemakerNodeCheck():
15f218
+    if (
15f218
+        not utils.usefile
15f218
+        and
15f218
+        not utils.is_rhel6()
15f218
+        and
15f218
+        utils.corosyncPacemakerNodeCheck()
15f218
+    ):
15f218
         print("WARNING: corosync and pacemaker node names do not match (IPs used in setup?)")
15f218
 
15f218
     print(output)
15f218
diff --git a/pcs/utils.py b/pcs/utils.py
15f218
index 171fbdd..01db081 100644
15f218
--- a/pcs/utils.py
15f218
+++ b/pcs/utils.py
15f218
@@ -1808,12 +1808,13 @@ def stonithCheck():
15f218
         if p.attrib["class"] == "stonith":
15f218
             return False
15f218
 
15f218
-    # check if SBD daemon is running
15f218
-    try:
15f218
-        if is_service_running(cmd_runner(), "sbd"):
15f218
-            return False
15f218
-    except LibraryError:
15f218
-        pass
15f218
+    if not usefile:
15f218
+        # check if SBD daemon is running
15f218
+        try:
15f218
+            if is_service_running(cmd_runner(), "sbd"):
15f218
+                return False
15f218
+        except LibraryError:
15f218
+            pass
15f218
 
15f218
     return True
15f218
 
15f218
-- 
15f218
1.8.3.1
15f218