mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
86f6481e99
commit
ca315203be
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
gcore -o "/var/log/core" "$1" 2>&1 | logger -t "ctdb:gcore_trace"
|
@ -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
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user