File pacemaker-crmd-notification-timeout.patch of Package pacemaker.3577

commit 3a4ed09f9ae9de3e8a1f96f5203e803c0f621aeb
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Fri Oct 16 15:19:48 2015 -0500

    Fix: crmd: use 300s timeout with notification scripts, not 300ms
    
    crmd/notify.c:send_notification() sets a timeout for the notification script.
    This will get used ultimately by g_timeout_add(), which interprets it as
    milliseconds.

diff --git a/crmd/notify.c b/crmd/notify.c
index 916a04c..d5e211a 100644
--- a/crmd/notify.c
+++ b/crmd/notify.c
@@ -108,7 +108,7 @@ send_notification(const char *kind)
 
     notify = services_action_create_generic(notify_script, NULL);
 
-    notify->timeout = 300;
+    notify->timeout = CRMD_NOTIFY_TIMEOUT_MS;
     notify->standard = strdup("event");
     notify->id = strdup(notify_script);
     notify->agent = strdup(notify_script);
diff --git a/crmd/notify.h b/crmd/notify.h
index 4b138ea..d54163f 100644
--- a/crmd/notify.h
+++ b/crmd/notify.h
@@ -22,6 +22,9 @@
 #  include <crm/cluster.h>
 #  include <crm/stonith-ng.h>
 
+/* Timeout to use before killing a notification script (in milliseconds) */
+#  define CRMD_NOTIFY_TIMEOUT_MS (300000)
+
 void crmd_enable_notifications(const char *script, const char *target);
 void crmd_notify_node_event(crm_node_t *node);
 void crmd_notify_fencing_op(stonith_event_t * e);
openSUSE Build Service is sponsored by