Blame SOURCES/bz1420757-02-fix-cib-push-diff-against-when-the-diff-is-empty.patch

cca0ee
From 0fb8059bc401c5797ec7c1c46a8aed5ad6b63249 Mon Sep 17 00:00:00 2001
cca0ee
From: Tomas Jelinek <tojeline@redhat.com>
cca0ee
Date: Tue, 14 Feb 2017 09:19:15 +0100
cca0ee
Subject: [PATCH 3/3] fix 'cib-push diff-against=' when the diff is empty
cca0ee
cca0ee
---
cca0ee
 pcs/cluster.py | 5 +++++
cca0ee
 1 file changed, 5 insertions(+)
cca0ee
cca0ee
diff --git a/pcs/cluster.py b/pcs/cluster.py
cca0ee
index 32ea8c3..1af1ebf 100644
cca0ee
--- a/pcs/cluster.py
cca0ee
+++ b/pcs/cluster.py
cca0ee
@@ -1245,8 +1245,13 @@ def cluster_push(argv):
cca0ee
         # dummy_retval == -1 means one of two things:
cca0ee
         # a) an error has occured
cca0ee
         # b) --original and --new differ
cca0ee
+        # therefore it's of no use to see if an error occurred
cca0ee
         if error.strip():
cca0ee
             utils.err("unable to diff the CIBs:\n" + error)
cca0ee
+        if not patch.strip():
cca0ee
+            utils.err(
cca0ee
+                "The new CIB is the same as the original CIB, nothing to push."
cca0ee
+            )
cca0ee
 
cca0ee
         command = ["cibadmin", "--patch", "--xml-pipe"]
cca0ee
         output, error, retval = runner.run(command, patch)
cca0ee
-- 
cca0ee
1.8.3.1
cca0ee