summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin Vigor <kvigor@fb.com>2016-12-21 09:27:36 -0800
committerKevin Vigor <kvigor@fb.com>2016-12-21 10:58:54 -0800
commit9e1e0bf6e025c5fbd463086b47de18652fa3eb2f (patch)
treec4d390bf89216340af090ba69173bdc8edfd92db /tests
parent11afb5954e43848f5cf5ba7eac0f7ad8ef233934 (diff)
Repair cluster prove tests for FB environment
Summary: Several prove tests use the 'launch_cluster' function to set up a clustered volume. This replies on using multiple local IP addresses, one for each server. Since IPV6 provides only ::1 as a local address, as opposed to IPv4's complete 127.x.x.x subnet, this cannot work in a pure IPv6 environment. However, FB systems do at least have enough IPv4 stack to talk locally, so fix launch_cluster to work properly when default transport is IPv6. To do this: 1) explicitly set transport.address-family volume option to inet in launch_cluster(). 2) teach glusterd to honor transport.address-family when connecting to peer glusterds in glusterd_friend_rpc_create(). Previously transport.address-family was used only for binding local socket, not for communicating with peers. Test Plan: prove -f --timer ./tests/basic/glusterd/arbiter-volume-probe.t Reviewers: Subscribers: Tasks: Blame Revision: Change-Id: I077d8549dcdbe4919ac7df34856a4b2d1428cdb6 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16225 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/cluster.rc9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/cluster.rc b/tests/cluster.rc
index 467bbcb06e1..42547f09e37 100644
--- a/tests/cluster.rc
+++ b/tests/cluster.rc
@@ -46,17 +46,18 @@ function define_glusterds() {
bopt="management.transport.socket.bind-address=${!h}";
popt="--pid-file=${!b}/glusterd.pid";
sopt="management.glusterd-sockfile=${!b}/glusterd/gd.sock"
+ aopt="*.transport.address-family=inet"
#Get the logdir
logdir=`gluster --print-logdir`
#Fetch the testcases name and prefix the glusterd log with it
logfile=`echo ${0##*/}`_glusterd$i.log
lopt="--log-file=$logdir/$logfile"
if [ "$2" == "-LDEBUG" ]; then
- eval "glusterd_$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'";
- eval "glusterd$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'";
+ eval "glusterd_$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt --xlator-option $aopt $lopt $popt'";
+ eval "glusterd$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt --xlator-option $aopt $lopt $popt'";
else
- eval "glusterd_$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'";
- eval "glusterd$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt $lopt $popt'";
+ eval "glusterd_$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt --xlator-option $aopt $lopt $popt'";
+ eval "glusterd$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $sopt --xlator-option $aopt $lopt $popt'";
fi
done
}