File pacemaker-fencing-delete-rsc-attribute-update-device.patch of Package pacemaker.3577
commit 98e69e033835b3d4dfdc8c9cabacae28770725f1
Author: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Wed Dec 9 15:01:25 2015 +0100
Fix RHBZ#1287315: stonithd: Trigger cib_devices_update in case of deletion of just an attribute
diff --git a/fencing/main.c b/fencing/main.c
index e9831f0..0dc4492 100644
--- a/fencing/main.c
+++ b/fencing/main.c
@@ -760,8 +760,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=\'");
if (rsc_id != NULL) {
rsc_id += strlen("primitive[@id=\'");