File pacemaker-crmd-load-reduced-carries-out-action.patch of Package pacemaker.3577

commit 4c4042b4bb0c2063a32dc5caa633795eb4bf38fb
Author: HideoYamauchi <renayama19661014@ybb.ne.jp>
Date:   Mon Jul 4 13:24:05 2016 +0900

    Mid: crmd: When node load was reduced, crmd carries out a feasible action.

diff --git a/crmd/messages.c b/crmd/messages.c
index 060396f..a4a6ad5 100644
--- a/crmd/messages.c
+++ b/crmd/messages.c
@@ -34,6 +34,7 @@
 #include <crmd.h>
 #include <crmd_messages.h>
 #include <crmd_lrm.h>
+#include <tengine.h>
 #include <throttle.h>
 
 GListPtr fsa_message_queue = NULL;
@@ -752,6 +753,12 @@ handle_request(xmlNode * stored_msg, enum crmd_fsa_cause cause)
 
     } else if (strcmp(op, CRM_OP_THROTTLE) == 0) {
         throttle_update(stored_msg);
+        if (AM_I_DC && transition_graph != NULL) {
+            if (transition_graph->complete == FALSE) {
+                crm_debug("The throttle changed. Trigger a graph.");
+                trigger_graph();
+            }
+        }
         return I_NULL;
 
     } else if (strcmp(op, CRM_OP_CLEAR_FAILCOUNT) == 0) {
openSUSE Build Service is sponsored by