File pacemaker-pengine-OCF_RESKEY_CRM_meta_notify_active-multistate-resources.patch of Package pacemaker.3577

commit a6713c5d40327eff8549e7f596501ab1785b8765
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Mon Aug 1 12:02:10 2016 -0500

    Fix: pengine: set OCF_RESKEY_CRM_meta_notify_active_* for multistate resources
    
    CLBZ#5295

diff --git a/pengine/notif.c b/pengine/notif.c
index f8abcba..5907203 100644
--- a/pengine/allocate.c
+++ b/pengine/allocate.c
@@ -71,6 +71,16 @@ sort_notify_entries(gconstpointer a, gconstpointer b)
     return strcmp(entry_a->node->details->id, entry_b->node->details->id);
 }
 
+static notify_entry_t *dup_notify_entry(notify_entry_t *entry)
+{
+    notify_entry_t *dup = malloc(sizeof(notify_entry_t));
+
+    CRM_ASSERT(dup != NULL);
+    dup->rsc = entry->rsc;
+    dup->node = entry->node;
+    return dup;
+}
+
 static char *
 expand_node_list(GListPtr list)
 {
@@ -432,9 +442,13 @@ collect_notification_data(resource_t * rsc, gboolean state, gboolean activity,
                 break;
             case RSC_ROLE_SLAVE:
                 n_data->slave = g_list_prepend(n_data->slave, entry);
+                n_data->active = g_list_prepend(n_data->active,
+                                                dup_notify_entry(entry));
                 break;
             case RSC_ROLE_MASTER:
                 n_data->master = g_list_prepend(n_data->master, entry);
+                n_data->active = g_list_prepend(n_data->active,
+                                                dup_notify_entry(entry));
                 break;
             default:
                 crm_err("Unsupported notify role");
openSUSE Build Service is sponsored by