diff --git a/ctdb/config/ctdb.sysconfig b/ctdb/config/ctdb.sysconfig index 7e775a2a797..6b7af67f647 100644 --- a/ctdb/config/ctdb.sysconfig +++ b/ctdb/config/ctdb.sysconfig @@ -148,6 +148,11 @@ CTDB_RECOVERY_LOCK="/some/place/on/shared/storage" # dump no stack traces. # CTDB_NFS_DUMP_STUCK_THREADS=5 +# Host to use for rpcinfo checks. Using "localhost" causes +# /etc/services to be read serveral times by rpcinfo, so this allows +# optimisation. +CTDB_RPCINFO_LOCALHOST="127.0.0.1" + # When set to yes, the CTDB node will start in DISABLED mode and not host # any public ip addresses. The administrator needs to explicitely enable # the node with "ctdb enable" diff --git a/ctdb/config/functions b/ctdb/config/functions index d9c8a219305..087c6efb642 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -408,7 +408,9 @@ ctdb_check_rpc () progname="$1" version="$2" - if ! ctdb_check_rpc_out=$(rpcinfo -u localhost $progname $version 2>&1) ; then + _localhost="${CTDB_RPCINFO_LOCALHOST:-127.0.0.1}" + + if ! ctdb_check_rpc_out=$(rpcinfo -u $_localhost $progname $version 2>&1) ; then ctdb_check_rpc_out="ERROR: $progname failed RPC check: $ctdb_check_rpc_out" echo "$ctdb_check_rpc_out"