Blob Blame History Raw
From 6e1d73f3e88f60b21173bb1129b6c0508a0c0268 Mon Sep 17 00:00:00 2001
From: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Date: Fri, 10 Mar 2017 15:17:44 +0100
Subject: [PATCH] Low: tools: disable agent stdout/stderr for crm_resource
 --validate

Argument --verbose is required to show the stderr/stdout output of the
command.
---
 tools/crm_resource_runtime.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
index ca38aea..5414b94 100644
--- a/tools/crm_resource_runtime.c
+++ b/tools/crm_resource_runtime.c
@@ -1552,6 +1552,10 @@ cli_resource_execute(const char *rsc_id, const char *rsc_action, GHashTable *ove
                    action, rsc->id, rclass, rprov ? rprov : "", rtype, op->status);
         }
 
+        /* hide output for validate-all if not in verbose */
+        if (!do_trace && safe_str_eq(action, "validate-all"))
+            goto done;
+
         if (op->stdout_data) {
             local_copy = strdup(op->stdout_data);
             more = strlen(local_copy);
@@ -1581,6 +1585,7 @@ cli_resource_execute(const char *rsc_id, const char *rsc_action, GHashTable *ove
             free(local_copy);
         }
     }
+  done:
     rc = op->rc;
     services_action_free(op);
     return rc;
-- 
1.8.3.1