Blame SOURCES/0041-delete-fence-attributes-correctly.patch

0240e4
From 98e69e033835b3d4dfdc8c9cabacae28770725f1 Mon Sep 17 00:00:00 2001
0240e4
From: Klaus Wenninger <klaus.wenninger@aon.at>
0240e4
Date: Wed, 9 Dec 2015 15:01:25 +0100
0240e4
Subject: [PATCH] Fix RHBZ#1287315: stonithd: Trigger cib_devices_update in
0240e4
 case of deletion of just an attribute
0240e4
0240e4
---
0240e4
 fencing/main.c | 7 ++++++-
0240e4
 1 file changed, 6 insertions(+), 1 deletion(-)
0240e4
0240e4
diff --git a/fencing/main.c b/fencing/main.c
0240e4
index e9831f0..0dc4492 100644
0240e4
--- a/fencing/main.c
0240e4
+++ b/fencing/main.c
0240e4
@@ -796,8 +796,13 @@ update_cib_stonith_devices_v2(const char *event, xmlNode * msg)
0240e4
         } else if(safe_str_eq(op, "delete") && strstr(xpath, XML_CIB_TAG_RESOURCE)) {
0240e4
             const char *rsc_id = NULL;
0240e4
             char *search = NULL;
0240e4
-            char *mutable = strdup(xpath);
0240e4
+            char *mutable = NULL;
0240e4
 
0240e4
+            if (strstr(xpath, XML_TAG_ATTR_SETS)) {
0240e4
+                needs_update = TRUE;
0240e4
+                break;
0240e4
+            } 
0240e4
+            mutable = strdup(xpath);
0240e4
             rsc_id = strstr(mutable, "primitive[@id=\'") + strlen("primitive[@id=\'");
0240e4
             search = strchr(rsc_id, '\'');
0240e4
             search[0] = 0;
0240e4
-- 
0240e4
1.8.3.1
0240e4