summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2014-01-06 12:38:08 +0000
committerVijay Bellur <vbellur@redhat.com>2014-01-20 04:23:18 -0800
commitb2ef4e3d11af79a765406672bb6ca070b40c9b64 (patch)
treed74dafde3d6b18d0c282dab7e96a952223c7ea59 /tests
parent8d55c25f158921b508bff0e7f25158991913f922 (diff)
quota: unmount quota aux mount for volume stop
Previously df -h used to display "Transport end point not connected" for quota auxiliary mount after volume is stopped. This patch unmounts the auxiliary mount when the volume is stopped in all peer nodes for that volume. Change-Id: I78abb44386cd8242a532f92c13df8bdb57c78e31 BUG: 1049323 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/6656 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/bugs/bug-1049323.t64
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/bugs/bug-1049323.t b/tests/bugs/bug-1049323.t
new file mode 100755
index 00000000000..203612e91f1
--- /dev/null
+++ b/tests/bugs/bug-1049323.t
@@ -0,0 +1,64 @@
+#!/bin/bash
+. $(dirname $0)/../include.rc
+. $(dirname $0)/../volume.rc
+
+cleanup;
+
+function _init()
+{
+# Start glusterd
+TEST glusterd;
+TEST pidof glusterd;
+TEST $CLI volume info;
+
+#Create a volume
+TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2};
+
+#Verify volume is created
+EXPECT "$V0" volinfo_field $V0 'Volume Name';
+EXPECT 'Created' volinfo_field $V0 'Status';
+
+#Start volume and verify
+TEST $CLI volume start $V0;
+EXPECT 'Started' volinfo_field $V0 'Status';
+TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0
+
+#Enable Quota
+TEST $CLI volume quota $V0 enable
+
+##Wait for the auxiliary mount to comeup
+sleep 3;
+}
+
+function get_aux()
+{
+##Check if a auxiliary mount is there
+df -h | grep "/var/run/gluster/$V0" -
+
+if [ $? -eq 0 ]
+then
+ echo "0"
+else
+ echo "1"
+fi
+}
+
+function create_data()
+{
+#set some limit on the volume
+TEST $CLI volume quota $V0 limit-usage / 50MB;
+
+#Auxiliary mount should be there before stopping the volume
+EXPECT "0" get_aux;
+
+TEST $CLI volume stop $V0;
+
+#Aux mount should have been removed
+EXPECT "1" get_aux;
+
+}
+
+
+_init;
+create_data;
+cleanup;