Patch: Log more info when error returned when creating a pipe in CTDB

Richard Sharpe realrichardsharpe at gmail.com
Tue Jun 6 20:43:47 UTC 2017


Here is a patch to log some more info in CTDB when we fail to create a
pipe for client logging.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
-------------- next part --------------
From d772792c9724fb33924bae1cd322261c0d8e60aa Mon Sep 17 00:00:00 2001
From: Richard Sharpe <richard.sharpe at primarydata.com>
Date: Tue, 6 Jun 2017 13:34:51 -0700
Subject: [PATCH] Log the actual error returned when creating a pipe for client
 logging in CTDB fails. Helps with debugging issues.

Signed-off-by: Richard Sharpe <realrichardsharpe at gmail.com>
---
 ctdb/server/ctdb_logging.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ctdb/server/ctdb_logging.c b/ctdb/server/ctdb_logging.c
index 4c37063..e7ca9b2 100644
--- a/ctdb/server/ctdb_logging.c
+++ b/ctdb/server/ctdb_logging.c
@@ -169,7 +169,8 @@ struct ctdb_log_state *ctdb_vfork_with_logging(TALLOC_CTX *mem_ctx,
 	log->logfn_private = logfn_private;
 
 	if (pipe(p) != 0) {
-		DEBUG(DEBUG_ERR, (__location__ " Failed to setup pipe for child logging\n"));
+		DEBUG(DEBUG_ERR, (__location__ " Failed to setup pipe for child logging:"
+				" %s\n", strerror(errno)));
 		goto free_log;
 	}
 
-- 
2.3.6



More information about the samba-technical mailing list