diff options
author | Mohit Agrawal <moagrawa@redhat.com> | 2016-08-09 15:53:27 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-08-18 09:55:17 -0700 |
commit | 490d13b77619be7bb8edeadbfe1e8cf6eb7a0576 (patch) | |
tree | 9bb848f5ab65cfa4ef89321cf732f7df5ea8e844 /xlators/mgmt | |
parent | 24b499447a69c5e2979e15a99b16d5112be237d0 (diff) |
glusterd: Convert volume to replica after adding brick self heal is not triggered
Problem: After add brick to a distribute volume to convert to replica is not
triggering self heal.
Solution: Modify the condition in brick_graph_add_index to set trusted.afr.dirty
attribute in xlator.
Test : To verify the patch followd below steps
1) Create a single node volume
gluster volume create <DIS> <IP:/dist1/brick1>
2) Start volume and create mount point
mount -t glusterfs <IP>:/DIS /mnt
3) Touch some file and write some data on file
4) Add another brick along with replica 2
gluster volume add-brick DIS replica 2 <IP>:/dist2/brick2
5) Before apply the patch file size is 0 bytes in mount point.
Backport of commit 87bb8d0400d4ed18dd3954b1d9e5ca6ee0fb9742
BUG: 1366440
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
> Change-Id: Ief0ccbf98ea21b53d0e27edef177db6cabb3397f
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
> Reviewed-on: http://review.gluster.org/15118
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> Reviewed-by: Ravishankar N <ravishankar@redhat.com>
> Reviewed-by: Anuradha Talur <atalur@redhat.com>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
> (cherry picked from commit 87bb8d0400d4ed18dd3954b1d9e5ca6ee0fb9742)
Change-Id: Icd104cf5a2152a9c606dac209746e2953c4d293e
Reviewed-on: http://review.gluster.org/15151
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Anuradha Talur <atalur@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 7d263b43aeb..b6b4914d422 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1869,7 +1869,8 @@ brick_graph_add_index (volgen_graph_t *graph, glusterd_volinfo_t *volinfo, goto out; } if ((volinfo->type == GF_CLUSTER_TYPE_STRIPE_REPLICATE || - volinfo->type == GF_CLUSTER_TYPE_REPLICATE)) { + volinfo->type == GF_CLUSTER_TYPE_REPLICATE || + volinfo->type == GF_CLUSTER_TYPE_NONE)) { ret = xlator_set_option (xl, "xattrop-dirty-watchlist", "trusted.afr.dirty"); if (ret) |