From: Martin Schwenke Date: Tue, 20 Feb 2018 07:32:04 +0000 (+1100) Subject: ctdb-common: Drop debugging variable CTDB_EXTERNAL_TRACE X-Git-Tag: talloc-2.1.12~320 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca315203beab08649993285d0bf6b7a29b542887;p=thirdparty%2Fsamba.git ctdb-common: Drop debugging variable CTDB_EXTERNAL_TRACE This was an attempt to debug an unexpected situation. It never triggered, so delete it and all supporting code. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/common/common.h b/ctdb/common/common.h index 1b276ca2139..02bb746c9b3 100644 --- a/ctdb/common/common.h +++ b/ctdb/common/common.h @@ -103,8 +103,6 @@ bool ctdb_set_helper(const char *type, char *helper, size_t size, const char *envvar, const char *dir, const char *file); -void ctdb_external_trace(void); - int ctdb_parse_address(TALLOC_CTX *mem_ctx, const char *str, ctdb_sock_addr *address); diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c index 82526b58a19..cbab3672a67 100644 --- a/ctdb/common/ctdb_util.c +++ b/ctdb/common/ctdb_util.c @@ -136,36 +136,6 @@ bool ctdb_set_helper(const char *type, char *helper, size_t size, return true; } -/* Invoke an external program to do some sort of tracing on the CTDB - * process. This might block for a little while. The external - * program is specified by the environment variable - * CTDB_EXTERNAL_TRACE. This program should take one argument: the - * pid of the process to trace. Commonly, the program would be a - * wrapper script around gcore. - */ -void ctdb_external_trace(void) -{ - int ret; - static char external_trace[PATH_MAX+1] = ""; - char * cmd; - - if (!ctdb_set_helper("external trace handler", - external_trace, sizeof(external_trace), - "CTDB_EXTERNAL_TRACE", NULL, NULL)) { - return; - } - - cmd = talloc_asprintf(NULL, "%s %lu", external_trace, (unsigned long) getpid()); - DEBUG(DEBUG_WARNING,("begin external trace: %s\n", cmd)); - ret = system(cmd); - if (ret == -1) { - DEBUG(DEBUG_ERR, - ("external trace command \"%s\" failed\n", cmd)); - } - DEBUG(DEBUG_WARNING,("end external trace: %s\n", cmd)); - talloc_free(cmd); -} - /* parse a IP:port pair */ @@ -462,7 +432,6 @@ char *ctdb_addr_to_str(ctdb_sock_addr *addr) break; default: DEBUG(DEBUG_ERR, (__location__ " ERROR, unknown family %u\n", addr->sa.sa_family)); - ctdb_external_trace(); } return cip; diff --git a/ctdb/config/ctdbd_wrapper b/ctdb/config/ctdbd_wrapper index 8eec379910e..a9587864f5b 100755 --- a/ctdb/config/ctdbd_wrapper +++ b/ctdb/config/ctdbd_wrapper @@ -148,7 +148,6 @@ build_ctdb_options () export_debug_variables () { [ -n "$CTDB_DEBUG_HUNG_SCRIPT" ] && export CTDB_DEBUG_HUNG_SCRIPT - [ -n "$CTDB_EXTERNAL_TRACE" ] && export CTDB_EXTERNAL_TRACE [ -n "$CTDB_DEBUG_LOCKS" ] && export CTDB_DEBUG_LOCKS } diff --git a/ctdb/config/gcore_trace.sh b/ctdb/config/gcore_trace.sh deleted file mode 100755 index 4d3e1d1d584..00000000000 --- a/ctdb/config/gcore_trace.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -gcore -o "/var/log/core" "$1" 2>&1 | logger -t "ctdb:gcore_trace" diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index 5ed9335b286..7e89634eed4 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -157,7 +157,6 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/ctdb/notify.sh %config(noreplace) %{_sysconfdir}/ctdb/debug-hung-script.sh %config(noreplace) %{_sysconfdir}/ctdb/ctdb-crash-cleanup.sh -%config(noreplace) %{_sysconfdir}/ctdb/gcore_trace.sh %config(noreplace) %{_sysconfdir}/ctdb/debug_locks.sh %config(noreplace, missingok) %{_sysconfdir}/sysconfig/ctdb diff --git a/ctdb/wscript b/ctdb/wscript index 059ce3d43d8..f96d692cc16 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -713,7 +713,6 @@ def build(bld): 'ctdb-crash-cleanup.sh', 'debug-hung-script.sh', 'debug_locks.sh', - 'gcore_trace.sh', 'nfs-linux-kernel-callout', 'notify.sh', 'statd-callout'