File pacemaker-core-line-number-of-callers-crm_set_clear_bit.patch of Package pacemaker

commit 0fbfe00e4764abc5d1bec4e6de7c116c95c8464c
Author: Andrew Beekhof <andrew@beekhof.net>
Date:   Fri Feb 24 10:30:16 2017 +1100

    Core: Track the line number of callers of crm_(set|clear)_bit

Index: pacemaker-1.1.16+20170320.77ea74d/include/crm/pengine/internal.h
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/include/crm/pengine/internal.h
+++ pacemaker-1.1.16+20170320.77ea74d/include/crm/pengine/internal.h
@@ -28,8 +28,8 @@
 #  define pe_warn(fmt...) { was_processing_warning = TRUE; crm_config_warning = TRUE; crm_warn(fmt); }
 #  define pe_proc_err(fmt...) { was_processing_error = TRUE; crm_err(fmt); }
 #  define pe_proc_warn(fmt...) { was_processing_warning = TRUE; crm_warn(fmt); }
-#  define pe_set_action_bit(action, bit) action->flags = crm_set_bit(__FUNCTION__, action->uuid, action->flags, bit)
-#  define pe_clear_action_bit(action, bit) action->flags = crm_clear_bit(__FUNCTION__, action->uuid, action->flags, bit)
+#  define pe_set_action_bit(action, bit) action->flags = crm_set_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
+#  define pe_clear_action_bit(action, bit) action->flags = crm_clear_bit(__FUNCTION__, __LINE__, action->uuid, action->flags, bit)
 
 typedef struct notify_data_s {
     GHashTable *keys;
Index: pacemaker-1.1.16+20170320.77ea74d/include/crm_internal.h
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/include/crm_internal.h
+++ pacemaker-1.1.16+20170320.77ea74d/include/crm_internal.h
@@ -158,39 +158,47 @@ char *generate_transition_magic(const ch
 char *generate_transition_key(int action, int transition_id, int target_rc, const char *node);
 
 static inline long long
-crm_clear_bit(const char *function, const char *target, long long word, long long bit)
+crm_clear_bit(const char *function, int line, const char *target, long long word, long long bit)
 {
     long long rc = (word & ~bit);
 
+    /* if(bit == 0x00002) { */
+    /*     crm_err("Bit 0x%.8llx for %s cleared by %s:%d", bit, target, function, line); */
+    /* } */
+
     if (rc == word) {
         /* Unchanged */
     } else if (target) {
-        crm_trace("Bit 0x%.8llx for %s cleared by %s", bit, target, function);
+        crm_trace("Bit 0x%.8llx for %s cleared by %s:%d", bit, target, function, line);
     } else {
-        crm_trace("Bit 0x%.8llx cleared by %s", bit, function);
+        crm_trace("Bit 0x%.8llx cleared by %s:%d", bit, function, line);
     }
 
     return rc;
 }
 
 static inline long long
-crm_set_bit(const char *function, const char *target, long long word, long long bit)
+crm_set_bit(const char *function, int line, const char *target, long long word, long long bit)
 {
     long long rc = (word | bit);
 
+    /* if(bit == 0x00002) { */
+    /*     crm_err("Bit 0x%.8llx for %s set by %s:%d", bit, target, function, line); */
+    /* } */
+
     if (rc == word) {
         /* Unchanged */
     } else if (target) {
-        crm_trace("Bit 0x%.8llx for %s set by %s", bit, target, function);
+        crm_trace("Bit 0x%.8llx for %s set by %s:%d", bit, target, function, line);
     } else {
-        crm_trace("Bit 0x%.8llx set by %s", bit, function);
+        crm_trace("Bit 0x%.8llx set by %s:%d", bit, function, line);
     }
 
     return rc;
 }
 
-#  define set_bit(word, bit) word = crm_set_bit(__FUNCTION__, NULL, word, bit)
-#  define clear_bit(word, bit) word = crm_clear_bit(__FUNCTION__, NULL, word, bit)
+#  define set_bit(word, bit) word = crm_set_bit(__FUNCTION__, __LINE__, NULL, word, bit)
+#  define clear_bit(word, bit) word = crm_clear_bit(__FUNCTION__, __LINE__, NULL, word, bit)
 
 char *generate_hash_key(const char *crm_msg_reference, const char *sys);
 
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/allocate.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/allocate.c
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/allocate.c
@@ -99,7 +99,7 @@ resource_alloc_functions_t resource_clas
 };
 
 gboolean
-update_action_flags(action_t * action, enum pe_action_flags flags, const char *source)
+update_action_flags(action_t * action, enum pe_action_flags flags, const char *source, int line)
 {
     static unsigned long calls = 0;
     gboolean changed = FALSE;
@@ -107,9 +107,9 @@ update_action_flags(action_t * action, e
     enum pe_action_flags last = action->flags;
 
     if (clear) {
-        action->flags = crm_clear_bit(source, action->uuid, action->flags, flags);
+        action->flags = crm_clear_bit(source, line, action->uuid, action->flags, flags);
     } else {
-        action->flags = crm_set_bit(source, action->uuid, action->flags, flags);
+        action->flags = crm_set_bit(source, line, action->uuid, action->flags, flags);
     }
 
     if (last != action->flags) {
@@ -1385,7 +1385,7 @@ fence_guest(pe_node_t *node, pe_action_t
      */
     stonith_op = pe_fence_op(node, fence_action, FALSE, data_set);
     update_action_flags(stonith_op, pe_action_pseudo | pe_action_runnable,
-                        __FUNCTION__);
+                        __FUNCTION__, __LINE__);
 
     /* We want to imply stops/demotes after the guest is stopped, not wait until
      * it is restarted, so we always order pseudo-fencing after stop, not start
@@ -1651,7 +1651,7 @@ rsc_order_then(action_t * lh_action, res
             order_actions(lh_action, rh_action_iter, type);
 
         } else if (type & pe_order_implies_then) {
-            update_action_flags(rh_action_iter, pe_action_runnable | pe_action_clear, __FUNCTION__);
+            update_action_flags(rh_action_iter, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
             crm_warn("Unrunnable %s 0x%.6x", rh_action_iter->uuid, type);
         } else {
             crm_warn("neither %s 0x%.6x", rh_action_iter->uuid, type);
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/allocate.h
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/allocate.h
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/allocate.h
@@ -152,7 +152,7 @@ extern enum pe_graph_flags clone_update_
                                                 enum pe_action_flags flags,
                                                 enum pe_action_flags filter, enum pe_ordering type);
 
-gboolean update_action_flags(action_t * action, enum pe_action_flags flags, const char *source);
+gboolean update_action_flags(action_t * action, enum pe_action_flags flags, const char *source, int line);
 gboolean update_action(action_t * action);
 
 #endif
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/clone.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/clone.c
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/clone.c
@@ -846,12 +846,12 @@ clone_create_actions(resource_t * rsc, p
     started = custom_action(rsc, started_key(rsc),
                             RSC_STARTED, NULL, !child_starting, TRUE, data_set);
 
-    update_action_flags(start, pe_action_pseudo | pe_action_runnable, __FUNCTION__);
-    update_action_flags(started, pe_action_pseudo, __FUNCTION__);
+    update_action_flags(start, pe_action_pseudo | pe_action_runnable, __FUNCTION__, __LINE__);
+    update_action_flags(started, pe_action_pseudo, __FUNCTION__, __LINE__);
     started->priority = INFINITY;
 
     if (child_active || child_starting) {
-        update_action_flags(started, pe_action_runnable, __FUNCTION__);
+        update_action_flags(started, pe_action_runnable, __FUNCTION__, __LINE__);
     }
 
     child_ordering_constraints(rsc, data_set);
@@ -866,11 +866,11 @@ clone_create_actions(resource_t * rsc, p
                             RSC_STOPPED, NULL, !child_stopping, TRUE, data_set);
 
     stopped->priority = INFINITY;
-    update_action_flags(stop, pe_action_pseudo | pe_action_runnable, __FUNCTION__);
+    update_action_flags(stop, pe_action_pseudo | pe_action_runnable, __FUNCTION__, __LINE__);
     if (allow_dependent_migrations) {
-        update_action_flags(stop, pe_action_migrate_runnable, __FUNCTION__);
+        update_action_flags(stop, pe_action_migrate_runnable, __FUNCTION__, __LINE__);
     }
-    update_action_flags(stopped, pe_action_pseudo | pe_action_runnable, __FUNCTION__);
+    update_action_flags(stopped, pe_action_pseudo | pe_action_runnable, __FUNCTION__, __LINE__);
     if (clone_data->stop_notify == NULL) {
         clone_data->stop_notify =
             create_notification_boundaries(rsc, RSC_STOP, stop, stopped, data_set);
@@ -1204,7 +1204,7 @@ clone_action_flags(action_t * action, no
                 && is_set(child_flags, pe_action_optional) == FALSE) {
                 pe_rsc_trace(child, "%s is mandatory because of %s", action->uuid,
                              child_action->uuid);
-                flags = crm_clear_bit(__FUNCTION__, action->rsc->id, flags, pe_action_optional);
+                flags = crm_clear_bit(__FUNCTION__, __LINE__, action->rsc->id, flags, pe_action_optional);
                 pe_clear_action_bit(action, pe_action_optional);
             }
             if (is_set(child_flags, pe_action_runnable)) {
@@ -1226,7 +1226,7 @@ clone_action_flags(action_t * action, no
 
     if (check_runnable && any_runnable == FALSE) {
         pe_rsc_trace(action->rsc, "%s is not runnable because no children are", action->uuid);
-        flags = crm_clear_bit(__FUNCTION__, action->rsc->id, flags, pe_action_runnable);
+        flags = crm_clear_bit(__FUNCTION__, __LINE__, action->rsc->id, flags, pe_action_runnable);
         if (node == NULL) {
             pe_clear_action_bit(action, pe_action_runnable);
         }
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/constraints.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/constraints.c
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/constraints.c
@@ -390,7 +390,7 @@ unpack_simple_rsc_order(xmlNode * xml_ob
          * actions to be considered runnable before allowing the pseudo action
          * to be runnable. */ 
         unordered_action->required_runnable_before = min_required_before;
-        update_action_flags(unordered_action, pe_action_requires_any, __FUNCTION__);
+        update_action_flags(unordered_action, pe_action_requires_any, __FUNCTION__, __LINE__);
 
         for (rIter = rsc_first->children; id && rIter; rIter = rIter->next) {
             resource_t *child = rIter->data;
@@ -1788,7 +1788,7 @@ order_rsc_sets(const char *id, xmlNode *
         action_t *unordered_action = get_pseudo_op(task, data_set);
 
         free(task);
-        update_action_flags(unordered_action, pe_action_requires_any, __FUNCTION__);
+        update_action_flags(unordered_action, pe_action_requires_any, __FUNCTION__, __LINE__);
 
         for (xml_rsc = __xml_first_child(set1); xml_rsc != NULL; xml_rsc = __xml_next_element(xml_rsc)) {
             if (!crm_str_eq((const char *)xml_rsc->name, XML_TAG_RESOURCE_REF, TRUE)) {
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/graph.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/graph.c
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/graph.c
@@ -190,7 +190,7 @@ graph_update_action(action_t * first, ac
                                                 pe_action_optional, pe_order_implies_then);
 
         } else if (is_set(flags, pe_action_optional) == FALSE) {
-            if (update_action_flags(then, pe_action_optional | pe_action_clear, __FUNCTION__)) {
+            if (update_action_flags(then, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__)) {
                 changed |= pe_graph_updated_then;
             }
         }
@@ -223,7 +223,7 @@ graph_update_action(action_t * first, ac
 
         } else if (is_set(flags, pe_action_optional) == FALSE) {
             pe_rsc_trace(first->rsc, "first unrunnable: %s then %s", first->uuid, then->uuid);
-            if (update_action_flags(first, pe_action_runnable | pe_action_clear, __FUNCTION__)) {
+            if (update_action_flags(first, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__)) {
                 changed |= pe_graph_updated_first;
             }
         }
@@ -268,7 +268,7 @@ graph_update_action(action_t * first, ac
             /* if the runnable before count for then exceeds the required number
              * of "before" runnable actions... mark then as runnable */
             if (then->runnable_before >= then->required_runnable_before) {
-                if (update_action_flags(then, pe_action_runnable, __FUNCTION__)) {
+                if (update_action_flags(then, pe_action_runnable, __FUNCTION__, __LINE__)) {
                     changed |= pe_graph_updated_then;
                 }
             }
@@ -290,7 +290,7 @@ graph_update_action(action_t * first, ac
 
         } else if (is_set(flags, pe_action_runnable) == FALSE) {
             pe_rsc_trace(then->rsc, "then unrunnable: %s then %s", first->uuid, then->uuid);
-            if (update_action_flags(then, pe_action_runnable | pe_action_clear, __FUNCTION__)) {
+            if (update_action_flags(then, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__)) {
                 changed |= pe_graph_updated_then;
             }
         }
@@ -363,13 +363,13 @@ graph_update_action(action_t * first, ac
         && (flags & pe_action_optional) == 0) {
         processed = TRUE;
         crm_trace("%s implies %s printed", first->uuid, then->uuid);
-        update_action_flags(then, pe_action_print_always, __FUNCTION__);  /* don't care about changed */
+        update_action_flags(then, pe_action_print_always, __FUNCTION__, __LINE__);  /* don't care about changed */
     }
 
     if ((type & pe_order_implies_first_printed) && (flags & pe_action_optional) == 0) {
         processed = TRUE;
         crm_trace("%s implies %s printed", then->uuid, first->uuid);
-        update_action_flags(first, pe_action_print_always, __FUNCTION__); /* don't care about changed */
+        update_action_flags(first, pe_action_print_always, __FUNCTION__, __LINE__); /* don't care about changed */
     }
 
     if ((type & pe_order_implies_then
@@ -381,7 +381,7 @@ graph_update_action(action_t * first, ac
         && is_set(first->rsc->flags, pe_rsc_block)
         && is_not_set(first->flags, pe_action_runnable)) {
 
-        if (update_action_flags(then, pe_action_runnable | pe_action_clear, __FUNCTION__)) {
+        if (update_action_flags(then, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__)) {
             changed |= pe_graph_updated_then;
         }
 
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/master.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/master.c
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/master.c
@@ -845,14 +845,14 @@ master_create_actions(resource_t * rsc,
                                     RSC_PROMOTED, NULL, !any_promoting, TRUE, data_set);
 
     action_complete->priority = INFINITY;
-    update_action_flags(action, pe_action_pseudo, __FUNCTION__);
-    update_action_flags(action, pe_action_runnable, __FUNCTION__);
-    update_action_flags(action_complete, pe_action_pseudo, __FUNCTION__);
-    update_action_flags(action_complete, pe_action_runnable, __FUNCTION__);
+    update_action_flags(action, pe_action_pseudo, __FUNCTION__, __LINE__);
+    update_action_flags(action, pe_action_runnable, __FUNCTION__, __LINE__);
+    update_action_flags(action_complete, pe_action_pseudo, __FUNCTION__, __LINE__);
+    update_action_flags(action_complete, pe_action_runnable, __FUNCTION__, __LINE__);
 
     if (clone_data->masters_allocated > 0) {
-        update_action_flags(action, pe_action_runnable, __FUNCTION__);
-        update_action_flags(action_complete, pe_action_runnable, __FUNCTION__);
+        update_action_flags(action, pe_action_runnable, __FUNCTION__, __LINE__);
+        update_action_flags(action_complete, pe_action_runnable, __FUNCTION__, __LINE__);
     }
 
     child_promoting_constraints(clone_data, pe_order_optional,
@@ -869,10 +869,10 @@ master_create_actions(resource_t * rsc,
                                     RSC_DEMOTED, NULL, !any_demoting, TRUE, data_set);
     action_complete->priority = INFINITY;
 
-    update_action_flags(action, pe_action_pseudo, __FUNCTION__);
-    update_action_flags(action, pe_action_runnable, __FUNCTION__);
-    update_action_flags(action_complete, pe_action_pseudo, __FUNCTION__);
-    update_action_flags(action_complete, pe_action_runnable, __FUNCTION__);
+    update_action_flags(action, pe_action_pseudo, __FUNCTION__, __LINE__);
+    update_action_flags(action, pe_action_runnable, __FUNCTION__, __LINE__);
+    update_action_flags(action_complete, pe_action_pseudo, __FUNCTION__, __LINE__);
+    update_action_flags(action_complete, pe_action_runnable, __FUNCTION__, __LINE__);
 
     child_demoting_constraints(clone_data, pe_order_optional, rsc, NULL, last_demote_rsc, data_set);
 
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/native.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/native.c
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/native.c
@@ -749,12 +749,12 @@ RecurringOp(resource_t * rsc, action_t *
     if (start == NULL || is_set(start->flags, pe_action_runnable) == FALSE) {
         pe_rsc_debug(rsc, "%s\t   %s (cancelled : start un-runnable)", crm_str(node_uname),
                      mon->uuid);
-        update_action_flags(mon, pe_action_runnable | pe_action_clear, __FUNCTION__);
+        update_action_flags(mon, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
 
     } else if (node == NULL || node->details->online == FALSE || node->details->unclean) {
         pe_rsc_debug(rsc, "%s\t   %s (cancelled : no node available)", crm_str(node_uname),
                      mon->uuid);
-        update_action_flags(mon, pe_action_runnable | pe_action_clear, __FUNCTION__);
+        update_action_flags(mon, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
 
     } else if (is_set(mon->flags, pe_action_optional) == FALSE) {
         pe_rsc_info(rsc, " Start recurring %s (%llus) for %s on %s", mon->task, interval_ms / 1000,
@@ -971,7 +971,7 @@ RecurringOp_Stopped(resource_t * rsc, ac
             if (is_set(stop->flags, pe_action_runnable) == FALSE) {
                 crm_debug("%s\t   %s (cancelled : stop un-runnable)",
                           crm_str(stop_node_uname), stopped_mon->uuid);
-                update_action_flags(stopped_mon, pe_action_runnable | pe_action_clear, __FUNCTION__);
+                update_action_flags(stopped_mon, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
             }
 
             if (is_set(rsc->flags, pe_rsc_managed)) {
@@ -991,7 +991,7 @@ RecurringOp_Stopped(resource_t * rsc, ac
             && is_set(rsc->flags, pe_rsc_managed) == FALSE) {
             pe_rsc_trace(rsc, "Marking %s optional on %s due to unmanaged",
                          key, crm_str(stop_node_uname));
-            update_action_flags(stopped_mon, pe_action_optional, __FUNCTION__);
+            update_action_flags(stopped_mon, pe_action_optional, __FUNCTION__, __LINE__);
         }
 
         if (is_set(stopped_mon->flags, pe_action_optional)) {
@@ -1001,7 +1001,7 @@ RecurringOp_Stopped(resource_t * rsc, ac
         if (stop_node->details->online == FALSE || stop_node->details->unclean) {
             pe_rsc_debug(rsc, "%s\t   %s (cancelled : no node available)",
                          crm_str(stop_node_uname), stopped_mon->uuid);
-            update_action_flags(stopped_mon, pe_action_runnable | pe_action_clear, __FUNCTION__);
+            update_action_flags(stopped_mon, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
         }
 
         if (is_set(stopped_mon->flags, pe_action_runnable)
@@ -1055,7 +1055,7 @@ handle_migration_actions(resource_t * rs
         set_bit(start->flags, pe_action_migrate_runnable);
         set_bit(stop->flags, pe_action_migrate_runnable);
 
-        update_action_flags(start, pe_action_pseudo, __FUNCTION__);       /* easier than trying to delete it from the graph */
+        update_action_flags(start, pe_action_pseudo, __FUNCTION__, __LINE__);       /* easier than trying to delete it from the graph */
 
         /* order probes before migrations */
         if (partial) {
@@ -1263,7 +1263,7 @@ native_create_actions(resource_t * rsc,
     /* Required steps from this role to the next */
     while (role != rsc->next_role) {
         next_role = rsc_state_matrix[role][rsc->next_role];
-        pe_rsc_trace(rsc, "Role: Executing: %s->%s = (%s)", role2text(role), role2text(next_role), rsc->id);
+        pe_rsc_trace(rsc, "Role: Executing: %s->%s = (%s on %s)", role2text(role), role2text(next_role), rsc->id, chosen?chosen->details->uname:"NA");
         if (rsc_action_matrix[role][next_role] (rsc, chosen, FALSE, data_set) == FALSE) {
             break;
         }
@@ -1410,7 +1410,7 @@ native_internal_constraints(resource_t *
 
             if (load_stopped->node == NULL) {
                 load_stopped->node = node_copy(current);
-                update_action_flags(load_stopped, pe_action_optional | pe_action_clear, __FUNCTION__);
+                update_action_flags(load_stopped, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
             }
 
             custom_action_order(rsc, stop_key(rsc), NULL,
@@ -1424,7 +1424,7 @@ native_internal_constraints(resource_t *
 
             if (load_stopped->node == NULL) {
                 load_stopped->node = node_copy(next);
-                update_action_flags(load_stopped, pe_action_optional | pe_action_clear, __FUNCTION__);
+                update_action_flags(load_stopped, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
             }
 
             custom_action_order(NULL, strdup(load_stopped_task), load_stopped,
@@ -2417,7 +2417,7 @@ StopRsc(resource_t * rsc, node_t * next,
         stop = stop_action(rsc, current, optional);
 
         if (is_not_set(rsc->flags, pe_rsc_managed)) {
-            update_action_flags(stop, pe_action_runnable | pe_action_clear, __FUNCTION__);
+            update_action_flags(stop, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
         }
 
         if (is_set(data_set->flags, pe_flag_remove_after_stop)) {
@@ -2437,7 +2437,7 @@ StartRsc(resource_t * rsc, node_t * next
     pe_rsc_trace(rsc, "%s on %s %d", rsc->id, next ? next->details->uname : "N/A", optional);
     start = start_action(rsc, next, TRUE);
     if (is_set(start->flags, pe_action_runnable) && optional == FALSE) {
-        update_action_flags(start, pe_action_optional | pe_action_clear, __FUNCTION__);
+        update_action_flags(start, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
     }
     return TRUE;
 }
@@ -2481,7 +2481,7 @@ PromoteRsc(resource_t * rsc, node_t * ne
     for (gIter = action_list; gIter != NULL; gIter = gIter->next) {
         action_t *promote = (action_t *) gIter->data;
 
-        update_action_flags(promote, pe_action_runnable | pe_action_clear, __FUNCTION__);
+        update_action_flags(promote, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
     }
 
     g_list_free(action_list);
@@ -2773,7 +2773,7 @@ native_create_probe(resource_t * rsc, no
 
     key = generate_op_key(rsc->id, RSC_STATUS, 0);
     probe = custom_action(rsc, key, RSC_STATUS, node, FALSE, TRUE, data_set);
-    update_action_flags(probe, pe_action_optional | pe_action_clear, __FUNCTION__);
+    update_action_flags(probe, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
 
     /* If enabled, require unfencing before probing any fence devices
      * but ensure it happens after any resources that require
@@ -2940,9 +2940,9 @@ native_stop_constraints(resource_t * rsc
         /* The stop would never complete and is now implied by the fencing,
          * so convert it into a pseudo-action.
          */
-        update_action_flags(action, pe_action_pseudo, __FUNCTION__);
-        update_action_flags(action, pe_action_runnable, __FUNCTION__);
-        update_action_flags(action, pe_action_implied_by_stonith, __FUNCTION__);
+        update_action_flags(action, pe_action_pseudo, __FUNCTION__, __LINE__);
+        update_action_flags(action, pe_action_runnable, __FUNCTION__, __LINE__);
+        update_action_flags(action, pe_action_implied_by_stonith, __FUNCTION__, __LINE__);
 
         if(start == NULL || start->needs > rsc_req_quorum) {
             enum pe_ordering flags = pe_order_optional;
@@ -3041,8 +3041,8 @@ native_stop_constraints(resource_t * rsc
             /* The demote would never complete and is now implied by the
              * fencing, so convert it into a pseudo-action.
              */
-            update_action_flags(action, pe_action_pseudo, __FUNCTION__);
-            update_action_flags(action, pe_action_runnable, __FUNCTION__);
+            update_action_flags(action, pe_action_pseudo, __FUNCTION__, __LINE__);
+            update_action_flags(action, pe_action_runnable, __FUNCTION__, __LINE__);
 
             if (start == NULL || start->needs > rsc_req_quorum) {
                 order_actions(stonith_op, action, pe_order_preserve|pe_order_optional);
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/notif.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/notif.c
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/notif.c
@@ -315,8 +315,8 @@ create_notification_boundaries(resource_
             custom_action(rsc, key, RSC_NOTIFY, NULL, is_set(start->flags, pe_action_optional),
                           TRUE, data_set);
 
-        update_action_flags(n_data->pre, pe_action_pseudo, __FUNCTION__);
-        update_action_flags(n_data->pre, pe_action_runnable, __FUNCTION__);
+        update_action_flags(n_data->pre, pe_action_pseudo, __FUNCTION__, __LINE__);
+        update_action_flags(n_data->pre, pe_action_runnable, __FUNCTION__, __LINE__);
 
         add_hash_param(n_data->pre->meta, "notify_type", "pre");
         add_hash_param(n_data->pre->meta, "notify_operation", n_data->action);
@@ -330,8 +330,8 @@ create_notification_boundaries(resource_
             custom_action(rsc, key, RSC_NOTIFIED, NULL, is_set(start->flags, pe_action_optional),
                           TRUE, data_set);
 
-        update_action_flags(n_data->pre_done, pe_action_pseudo, __FUNCTION__);
-        update_action_flags(n_data->pre_done, pe_action_runnable, __FUNCTION__);
+        update_action_flags(n_data->pre_done, pe_action_pseudo, __FUNCTION__, __LINE__);
+        update_action_flags(n_data->pre_done, pe_action_runnable, __FUNCTION__, __LINE__);
 
         add_hash_param(n_data->pre_done->meta, "notify_type", "pre");
         add_hash_param(n_data->pre_done->meta, "notify_operation", n_data->action);
@@ -351,11 +351,11 @@ create_notification_boundaries(resource_
                           data_set);
 
         n_data->post->priority = INFINITY;
-        update_action_flags(n_data->post, pe_action_pseudo, __FUNCTION__);
+        update_action_flags(n_data->post, pe_action_pseudo, __FUNCTION__, __LINE__);
         if (is_set(end->flags, pe_action_runnable)) {
-            update_action_flags(n_data->post, pe_action_runnable, __FUNCTION__);
+            update_action_flags(n_data->post, pe_action_runnable, __FUNCTION__, __LINE__);
         } else {
-            update_action_flags(n_data->post, pe_action_runnable | pe_action_clear, __FUNCTION__);
+            update_action_flags(n_data->post, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
         }
 
         add_hash_param(n_data->post->meta, "notify_type", "post");
@@ -371,11 +371,11 @@ create_notification_boundaries(resource_
                           TRUE, data_set);
 
         n_data->post_done->priority = INFINITY;
-        update_action_flags(n_data->post_done, pe_action_pseudo, __FUNCTION__);
+        update_action_flags(n_data->post_done, pe_action_pseudo, __FUNCTION__, __LINE__);
         if (is_set(end->flags, pe_action_runnable)) {
-            update_action_flags(n_data->post_done, pe_action_runnable, __FUNCTION__);
+            update_action_flags(n_data->post_done, pe_action_runnable, __FUNCTION__, __LINE__);
         } else {
-            update_action_flags(n_data->post_done, pe_action_runnable | pe_action_clear, __FUNCTION__);
+            update_action_flags(n_data->post_done, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
         }
 
         add_hash_param(n_data->post_done->meta, "notify_type", "post");
@@ -585,13 +585,13 @@ expand_notification_data(notify_data_t *
     g_hash_table_insert(n_data->keys, strdup("notify_all_uname"), node_list);
 
     if (required && n_data->pre) {
-        update_action_flags(n_data->pre, pe_action_optional | pe_action_clear, __FUNCTION__);
-        update_action_flags(n_data->pre_done, pe_action_optional | pe_action_clear, __FUNCTION__);
+        update_action_flags(n_data->pre, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
+        update_action_flags(n_data->pre_done, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
     }
 
     if (required && n_data->post) {
-        update_action_flags(n_data->post, pe_action_optional | pe_action_clear, __FUNCTION__);
-        update_action_flags(n_data->post_done, pe_action_optional | pe_action_clear, __FUNCTION__);
+        update_action_flags(n_data->post, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
+        update_action_flags(n_data->post_done, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
     }
     return required;
 }
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/utils.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/utils.c
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/utils.c
@@ -271,10 +271,10 @@ native_assign_node(resource_t * rsc, GLi
 
             crm_debug("Processing %s", op->uuid);
             if(safe_str_eq(RSC_STOP, op->task)) {
-                update_action_flags(op, pe_action_optional | pe_action_clear, __FUNCTION__);
+                update_action_flags(op, pe_action_optional | pe_action_clear, __FUNCTION__, __LINE__);
 
             } else if(safe_str_eq(RSC_START, op->task)) {
-                update_action_flags(op, pe_action_runnable | pe_action_clear, __FUNCTION__);
+                update_action_flags(op, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
                 /* set_bit(rsc->flags, pe_rsc_block); */
 
             } else if(interval && safe_str_neq(interval, "0")) {
@@ -283,7 +283,7 @@ native_assign_node(resource_t * rsc, GLi
 
                 } else {
                     /* Normal monitor operation, cancel it */
-                    update_action_flags(op, pe_action_runnable | pe_action_clear, __FUNCTION__);
+                    update_action_flags(op, pe_action_runnable | pe_action_clear, __FUNCTION__, __LINE__);
                 }
             }
         }
openSUSE Build Service is sponsored by