scripts: Use tcp connection for checking RPC services
authorAmitay Isaacs <amitay@gmail.com>
Fri, 27 Mar 2015 01:04:03 +0000 (12:04 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 17 Apr 2015 01:18:50 +0000 (11:18 +1000)
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>
(Imported from commit 14886ed00c998c2ac4deb70f650584e9b371345d)

config/functions

index 71ccd0acb60d010cbbc1de7aa1ce6fef4d9dc798..33a3a3a861aeafcfdf17a90ac8a6204f00a6f4f1 100755 (executable)
@@ -435,7 +435,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"