ctdb-scripts: Use tcp connection for checking RPC services
authorAmitay Isaacs <amitay@gmail.com>
Fri, 27 Mar 2015 01:04:03 +0000 (12:04 +1100)
committerMartin Schwenke <martins@samba.org>
Fri, 27 Mar 2015 05:40:08 +0000 (06:40 +0100)
It's possible for a RPC service to register only for UDP and not TCP.
Since we assume all the NFS operations are over TCP, always check RPC
services over TCP.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/config/functions

index b2738edba891d5c7fe8d925bff387d6c84158cbc..1b2384ec0886035c1a9d695b9e7117c3fcfdb64a 100755 (executable)
@@ -449,7 +449,7 @@ ctdb_check_rpc ()
 
     _localhost="${CTDB_RPCINFO_LOCALHOST:-127.0.0.1}"
 
-    if ! ctdb_check_rpc_out=$(rpcinfo -u $_localhost $progname $version 2>&1) ; then
+    if ! ctdb_check_rpc_out=$(rpcinfo -T tcp $_localhost $progname $version 2>&1) ; then
        ctdb_check_rpc_out="ERROR: $progname failed RPC check:
 $ctdb_check_rpc_out"
        echo "$ctdb_check_rpc_out"