File pacemaker-cib-dryrun-notification.patch of Package pacemaker.3577

commit 1d1b13bd904658ab7b7850fa1b0149c35e54fc12
Author: Andrew Beekhof <andrew@beekhof.net>
Date:   Wed Feb 3 15:01:22 2016 +1100

    Fix: cib: Do not send notifications when the dryrun flag is present

Index: pacemaker/cib/callbacks.c
===================================================================
--- pacemaker.orig/cib/callbacks.c
+++ pacemaker/cib/callbacks.c
@@ -1329,7 +1329,7 @@ cib_process_command(xmlNode * request, x
         }
     }
 
-    if ((call_options & cib_inhibit_notify) == 0) {
+    if ((call_options & (cib_inhibit_notify|cib_dryrun)) == 0) {
         const char *client = crm_element_value(request, F_CIB_CLIENTNAME);
 
         crm_trace("Sending notifications");
Index: pacemaker/lib/cib/cib_utils.c
===================================================================
--- pacemaker.orig/lib/cib/cib_utils.c
+++ pacemaker/lib/cib/cib_utils.c
@@ -304,7 +304,7 @@ cib_perform_op(const char *op, int call_
     const char *user = crm_element_value(req, F_CIB_USER);
     bool with_digest = FALSE;
 
-    crm_trace("Begin %s%s op", is_query ? "read-only " : "", op);
+    crm_trace("Begin %s%s%s op", is_set(call_options, cib_dryrun)?"dry-run of ":"", is_query ? "read-only " : "", op);
 
     CRM_CHECK(output != NULL, return -ENOMSG);
     CRM_CHECK(result_cib != NULL, return -ENOMSG);
openSUSE Build Service is sponsored by