Blob Blame History Raw
From 98e69e033835b3d4dfdc8c9cabacae28770725f1 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Wed, 9 Dec 2015 15:01:25 +0100
Subject: [PATCH] Fix RHBZ#1287315: stonithd: Trigger cib_devices_update in
 case of deletion of just an attribute

---
 fencing/main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/fencing/main.c b/fencing/main.c
index e9831f0..0dc4492 100644
--- a/fencing/main.c
+++ b/fencing/main.c
@@ -796,8 +796,13 @@ update_cib_stonith_devices_v2(const char *event, xmlNode * msg)
         } else if(safe_str_eq(op, "delete") && strstr(xpath, XML_CIB_TAG_RESOURCE)) {
             const char *rsc_id = NULL;
             char *search = NULL;
-            char *mutable = strdup(xpath);
+            char *mutable = NULL;
 
+            if (strstr(xpath, XML_TAG_ATTR_SETS)) {
+                needs_update = TRUE;
+                break;
+            } 
+            mutable = strdup(xpath);
             rsc_id = strstr(mutable, "primitive[@id=\'") + strlen("primitive[@id=\'");
             search = strchr(rsc_id, '\'');
             search[0] = 0;
-- 
1.8.3.1