summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd
diff options
context:
space:
mode:
authoranand <anekkunt@redhat.com>2015-06-13 16:46:10 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-08-06 05:13:30 -0700
commitb8120c91cb11de7b21f2d6a36f7dc89ad0b7c387 (patch)
tree67f7f57c453ecb37a00aaa647e80c092becfa827 /tests/bugs/glusterd
parent10864cdcc039f4c1a85ecd8dbeb6fba0fc539d4e (diff)
glusterd: rebalance support for cluster.rc framework
Issue:Rebalance is failing in cluster framework (any simulated cluster environment in same node ). RCA: 1. we are passing always "localhost" as volfile server for rebalance xlator . 2. Rebalance daemons are overwriting unix socket and log files each other. (All rebalance processes are creating socket with same name) . Fix: set vol_file_server, unix socket and log files properly. Back portof: >Change-Id: I6654461e00c2a164b2f1f1db24a316c4180dd8d5 >BUG: 1231437 >Signed-off-by: anand <anekkunt@redhat.com> >Reviewed-on: http://review.gluster.org/11210 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >(cherry picked from commit ee824ccb10e28489907fbf978a2d36b0b2c5dc8c) Change-Id: I31a97c6186efa36d568c469a2320a4f3e870f781 BUG: 1249983 Reviewed-on: http://review.gluster.org/11824 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'tests/bugs/glusterd')
-rw-r--r--tests/bugs/glusterd/bug-1231437-rebalance-test-in-cluster.t31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs/glusterd/bug-1231437-rebalance-test-in-cluster.t b/tests/bugs/glusterd/bug-1231437-rebalance-test-in-cluster.t
new file mode 100644
index 00000000000..3257f6994dd
--- /dev/null
+++ b/tests/bugs/glusterd/bug-1231437-rebalance-test-in-cluster.t
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../cluster.rc
+. $(dirname $0)/../../volume.rc
+
+
+cleanup;
+TEST launch_cluster 2;
+TEST $CLI_1 peer probe $H2;
+
+EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count
+
+$CLI_1 volume create $V0 $H1:$B1/$V0 $H2:$B2/$V0
+EXPECT 'Created' cluster_volinfo_field 1 $V0 'Status';
+
+$CLI_1 volume start $V0
+EXPECT 'Started' cluster_volinfo_field 1 $V0 'Status';
+
+#Mount FUSE
+TEST glusterfs -s $H1 --volfile-id=$V0 $M0;
+
+TEST mkdir $M0/dir{1..4};
+TEST touch $M0/dir{1..4}/files{1..4};
+
+TEST $CLI_1 volume add-brick $V0 $H1:$B1/${V0}1 $H2:$B2/${V0}1
+
+TEST $CLI_1 volume rebalance $V0 start
+EXPECT_WITHIN $REBALANCE_TIMEOUT "completed" cluster_rebalance_status_field 1 $V0
+
+cleanup;