summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd/bug-857330/xml.t
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2017-09-07 19:14:23 +0530
committerAtin Mukherjee <amukherj@redhat.com>2017-09-19 02:54:10 +0000
commit7f70d38b66ce755f848ff0197814457a28b321df (patch)
tree1405b386f301715953a18c7050e1a29487c9f115 /tests/bugs/glusterd/bug-857330/xml.t
parentf6775423d7fbe71fe35e6154388e77aae2e264ad (diff)
glusterd: disallow replace brick for dist only volumes
Allowing replace-brick on dist only volumes will lead to data loss. This patch blocks replace brick commit force to fail if a volume is dist only. Also removing tests/basic/pump.t as its of no use as per the discussion in http://lists.gluster.org/pipermail/gluster-devel/2017-September/053652.html Change-Id: Iabb0c16f865f3fc361b64a19bfcf0c0fbb5c2682 BUG: 1489432 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/18226 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests/bugs/glusterd/bug-857330/xml.t')
-rwxr-xr-xtests/bugs/glusterd/bug-857330/xml.t16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/bugs/glusterd/bug-857330/xml.t b/tests/bugs/glusterd/bug-857330/xml.t
index 391d189..8383d2a 100755
--- a/tests/bugs/glusterd/bug-857330/xml.t
+++ b/tests/bugs/glusterd/bug-857330/xml.t
@@ -9,7 +9,7 @@ TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
-TEST $CLI volume create $V0 $H0:$B0/${V0}1;
+TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}1 $H0:$B0/${V0}2;
TEST $CLI volume info $V0;
TEST $CLI volume start $V0;
@@ -24,7 +24,7 @@ EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
###############
## Rebalance ##
###############
-TEST $CLI volume add-brick $V0 $H0:$B0/${V0}2;
+TEST $CLI volume add-brick $V0 replica 2 $H0:$B0/${V0}3 $H0:$B0/${V0}4;
COMMAND="volume rebalance $V0 start"
PATTERN="task-id"
@@ -47,14 +47,14 @@ EXPECT_WITHIN $REBALANCE_TIMEOUT "0" get-task-status $PATTERN
###################
## Replace-brick ##
###################
-TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}2 $H0:$B0/${V0}3 commit force
+TEST $CLI volume replace-brick $V0 $H0:$B0/${V0}4 $H0:$B0/${V0}5 commit force
##################
## Remove-brick ##
##################
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status $V0 $H0 $B0/${V0}3
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT "1" brick_up_status $V0 $H0 $B0/${V0}5
-COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 start"
+COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 $H0:$B0/${V0}5 start"
PATTERN="task-id"
TEST check-and-store-task-id-xml
@@ -62,17 +62,17 @@ COMMAND="volume status $V0"
PATTERN="id"
EXPECT $TASK_ID get-task-id-xml
-COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 status"
+COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 $H0:$B0/${V0}5 status"
PATTERN="task-id"
EXPECT $TASK_ID get-task-id-xml
-COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 status"
+COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 $H0:$B0/${V0}5 status"
PATTERN="completed"
EXPECT_WITHIN $REBALANCE_TIMEOUT "0" get-task-status $PATTERN
## TODO: Add tests for remove-brick stop
-COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 commit"
+COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 $H0:$B0/${V0}5 commit"
PATTERN="task-id"
EXPECT $TASK_ID get-task-id-xml