diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2015-12-14 16:25:22 -0500 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2016-02-08 11:40:53 -0800 |
commit | fac8038a9fa80e16b557d91b9e2fec271cfda5fa (patch) | |
tree | 71a3cd9aa8da5b45e7cd1df364f393a044ed5dcc /tests | |
parent | b28a1d8e54d70deca14efa49da1781e29ce8eb51 (diff) |
NSR: Volgen Support
Allows the user to convert an afr-volume to a nsr-volume
by using cluster.nsr option in the volume set command
gluster volume set <volname> cluster.nsr <on/off>
Change-Id: Ia1c5aa89d27535f7275d474cf312dc5efb8e222f
BUG: 1158654
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/12943
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/nsr/nsr-volgen.t | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/basic/nsr/nsr-volgen.t b/tests/basic/nsr/nsr-volgen.t new file mode 100644 index 00000000000..99563ef608a --- /dev/null +++ b/tests/basic/nsr/nsr-volgen.t @@ -0,0 +1,37 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +volfiles=${GLUSTERD_WORKDIR}/vols/${V0}/ +check_brick_volfiles () { + for vf in ${volfiles}${V0}.$(hostname).*.vol; do + grep -qs experimental/nsr $vf || return + # At least for now, nothing else would put a client translator + # in a brick volfile. + grep -qs protocol/client $vf || return + done + echo "OK" +} + +TEST glusterd +TEST pidof glusterd + +TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2} +TEST $CLI volume set $V0 cluster.nsr on + +# Check that the client volfile got modified properly. +TEST grep -qs experimental/nsrc ${volfiles}${V0}.tcp-fuse.vol + +# Check that the brick volfiles got modified as well. +EXPECT "OK" check_brick_volfiles + +# Put things back and make sure the "undo" worked. +TEST $CLI volume set $V0 cluster.nsr off +TEST $CLI volume start $V0 +TEST $GFS -s $H0 --volfile-id $V0 $M0 +echo hello > $M0/probe +EXPECT hello cat ${B0}/${V0}1/probe +EXPECT hello cat ${B0}/${V0}2/probe + +cleanup |