summaryrefslogtreecommitdiffstats
path: root/tests/bugs/distribute
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2016-05-13 11:40:57 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-05-16 20:13:08 -0700
commita74f8cf4e7edc2ce9f045317a18dacddf25adb8a (patch)
tree72396b45ad1d7fd6a42b6290c8e7a4cb7b2e4e9c /tests/bugs/distribute
parent06f92634d9ad8aa5c56d786e5248016c283e5c5b (diff)
cluster/distribute: heal layout in discover codepath too
BUG: 1334164 Change-Id: I4259d88f2b6e4f9d4ad689bc4e438f1db9cfd177 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14365 Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests/bugs/distribute')
-rwxr-xr-xtests/bugs/distribute/bug-1088231.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/bugs/distribute/bug-1088231.t b/tests/bugs/distribute/bug-1088231.t
index b2347efe21f..8d4d1db73a5 100755
--- a/tests/bugs/distribute/bug-1088231.t
+++ b/tests/bugs/distribute/bug-1088231.t
@@ -31,6 +31,11 @@ gfid_with_hyphen=`getfattr -n glusterfs.gfid.string $M0/a 2>/dev/null \
TEST setfattr -x trusted.glusterfs.dht $B0/$V0"0"/a
+## new healing code don't attempt healing if inode is already
+## populated. So, unmount and remount before we do stat.
+TEST umount $M0
+TEST glusterfs --volfile-id=/$V0 --aux-gfid-mount --volfile-server=$H0 $M0
+
TEST stat $M0/.gfid/$gfid_with_hyphen
## Assuming that we have two bricks, we can have two permutations of layout
@@ -57,6 +62,8 @@ TEST stat $M0/.gfid/$gfid_with_hyphen
##Extract Layout
+echo `get_layout $B0/$V0"0"/a`
+echo `get_layout $B0/$V0"1"/a`
layout_b0_s=`get_layout $B0/$V0"0"/a | cut -c19-26`
layout_b0_e=`get_layout $B0/$V0"0"/a | cut -c27-34`
layout_b1_s=`get_layout $B0/$V0"1"/a | cut -c19-26`
@@ -70,7 +77,6 @@ layout_b1_s="0x"$layout_b1_s
layout_b1_e="0x"$layout_b1_e
-
## Logic of converting starting layout "0" to "Max_value of layout + 1"
comp1=$(($layout_b0_s + 0))
if [ "$comp1" == "0" ];then
@@ -114,9 +120,15 @@ gfid_with_hyphen=`getfattr -n glusterfs.gfid.string $M0/a 2>/dev/null \
TEST setfattr -x trusted.glusterfs.dht $B0/$V0"0"/a
TEST setfattr -x trusted.glusterfs.dht $B0/$V0"1"/a
+## new healing code don't attempt healing if inode is already
+## populated. So, unmount and remount before we do stat.
+TEST umount $M0
+TEST glusterfs --volfile-id=/$V0 --aux-gfid-mount --volfile-server=$H0 $M0
+
TEST stat $M0/.gfid/$gfid_with_hyphen
##Extract Layout
+
layout_b0_s=`get_layout $B0/$V0"0"/a | cut -c19-26`
layout_b0_e=`get_layout $B0/$V0"0"/a | cut -c27-34`
layout_b1_s=`get_layout $B0/$V0"1"/a | cut -c19-26`