File pacemaker-pengine-only-print-to-stdout-command-line.patch of Package pacemaker.14737
commit 349a37f5b2045537bf2ddcdd70f0852027b73e86
Author: Ken Gaillot <kgaillot@redhat.com>
Date: Mon Aug 21 17:00:41 2017 -0500
Log: PE: only print to stdout if run from command line
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
@@ -298,9 +298,11 @@ check_action_definition(resource_t * rsc
&& digest_secure
&& digest_data->digest_secure_calc
&& strcmp(digest_data->digest_secure_calc, digest_secure) == 0) {
- fprintf(stdout, "Only 'private' parameters to %s_%s_%d on %s changed: %s\n",
- rsc->id, task, interval, active_node->details->uname,
- crm_element_value(xml_op, XML_ATTR_TRANSITION_MAGIC));
+ if (is_set(data_set->flags, pe_flag_sanitized)) {
+ printf("Only 'private' parameters to %s_%s_%d on %s changed: %s\n",
+ rsc->id, task, interval, active_node->details->uname,
+ crm_element_value(xml_op, XML_ATTR_TRANSITION_MAGIC));
+ }
} else if (digest_data->rc == RSC_DIGEST_RESTART) {
/* Changes that force a restart */
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
@@ -753,8 +753,11 @@ master_color(resource_t * rsc, node_t *
chosen = child_rsc->fns->location(child_rsc, NULL, FALSE);
if (show_scores) {
- fprintf(stdout, "%s promotion score on %s: %s\n",
- child_rsc->id, chosen ? chosen->details->uname : "none", score);
+ if (is_set(data_set->flags, pe_flag_sanitized)) {
+ printf("%s promotion score on %s: %s\n",
+ child_rsc->id,
+ (chosen? chosen->details->uname : "none"), score);
+ }
} else {
do_crm_log(scores_log_level, "%s promotion score on %s: %s",