summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-05-19 14:54:32 +0530
committerKaushal M <kaushal@redhat.com>2015-05-31 21:40:47 -0700
commit1b3d0bb2d8a75806968532d2ee006f34e9bb6334 (patch)
treecb985dbf44f581aaa378144f978c5457185bf50a
parent3ea46dca41d0a006576214b2d71a462ee6866c4d (diff)
tiering/nfs: duplication of nodes in client graph
Back port of http://review.gluster.org/10820 When creating client volfiles, xlator tier-dht will be loaded for each volume. So for services like nfs have one or more volumes . So for each volume in the graph a tier-dht xlator will be created. So the graph parser will fail because of the redundant node in graph. By this change tier-dht will be renamed as volname-tier-dht >Change-Id: I3c9b9c23ddcb853773a8a02be7fd8a5d09a7f972 >BUG: 1222840 >Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> >Reviewed-on: http://review.gluster.org/10820 >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Tested-by: NetBSD Build System >Reviewed-by: Kaushal M <kaushal@redhat.com> Change-Id: I5629d48d4d1dbec8790f75e2fee66729aa2f6eed BUG: 1226029 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/10981 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes Reviewed-by: Kaushal M <kaushal@redhat.com>
-rwxr-xr-xtests/basic/tier/bug-1214222-directories_miising_after_attach_tier.t4
-rwxr-xr-xtests/basic/tier/tier.t4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c4
4 files changed, 10 insertions, 4 deletions
diff --git a/tests/basic/tier/bug-1214222-directories_miising_after_attach_tier.t b/tests/basic/tier/bug-1214222-directories_miising_after_attach_tier.t
index 028bc6a47d0..6199463b36d 100755
--- a/tests/basic/tier/bug-1214222-directories_miising_after_attach_tier.t
+++ b/tests/basic/tier/bug-1214222-directories_miising_after_attach_tier.t
@@ -57,6 +57,9 @@ TEST $CLI volume set $V0 features.ctr-enabled on
TEST [ -d d1 ]
TEST [ -e file1 ]
+cd
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0;
+
TEST $CLI volume detach-tier $V0 start
TEST $CLI volume detach-tier $V0 commit
@@ -64,4 +67,5 @@ EXPECT "0" confirm_tier_removed ${V0}${CACHE_BRICK_FIRST}
EXPECT_WITHIN $REBALANCE_TIMEOUT "0" confirm_vol_stopped $V0
+
cleanup
diff --git a/tests/basic/tier/tier.t b/tests/basic/tier/tier.t
index 79e171f85bf..2a5f7486d7f 100755
--- a/tests/basic/tier/tier.t
+++ b/tests/basic/tier/tier.t
@@ -110,7 +110,7 @@ sleep 12
uuidgen >> d1/data2.txt
# Check promotion on read to slow tier
-( cd $M0 ; umount $M0 ) # fail but drops kernel cache
+( cd $M0 ; umount -l $M0 ) # fail but drops kernel cache
cat d1/data3.txt
sleep 5
EXPECT_WITHIN $PROMOTE_TIMEOUT "0" file_on_fast_tier d1/data2.txt
@@ -133,4 +133,6 @@ EXPECT "0" confirm_tier_removed ${V0}${CACHE_BRICK_FIRST}
EXPECT_WITHIN $REBALANCE_TIMEOUT "0" confirm_vol_stopped $V0
+cd;
+
cleanup
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index bc0763483fd..5a23d2bf0c7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -555,7 +555,7 @@ glusterd_brick_op_build_payload (glusterd_op_t op, glusterd_brickinfo_t *brickin
goto out;
ret = glusterd_volinfo_find (volname, &volinfo);
if (volinfo->type == GF_CLUSTER_TYPE_TIER)
- snprintf (name, 1024, "tier-dht");
+ snprintf (name, 1024, "%s-tier-dht", volname);
else
snprintf (name, 1024, "%s-dht", volname);
brick_req->name = gf_strdup (name);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 568ce61fb39..fc8b7699833 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3401,8 +3401,8 @@ volume_volgen_graph_build_clusters_tier (volgen_graph_t *graph,
volinfo->type = GF_CLUSTER_TYPE_TIER;
- xl = volgen_graph_add_nolink (graph, "cluster/tier", "%s",
- "tier-dht", 0);
+ xl = volgen_graph_add_nolink (graph, "cluster/tier", "%s-%s",
+ st_volname, "tier-dht");
if (!xl)
goto out;