summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorkarthik-us <ksubrahm@redhat.com>2018-12-04 11:19:27 +0530
committerRavishankar N <ravishankar@redhat.com>2018-12-18 10:30:19 +0000
commit9662504d45f3e285772f5188a7edf7ae3665cc6a (patch)
tree5541bccdb72488711a21d9604ef90afbd91bf23b /xlators/mgmt/glusterd/src
parentb87c397091bac6a4a6dec4e45a7671fad4a11770 (diff)
cluster/afr: Allow lookup on root if it is from ADD_REPLICA_MOUNT
Problem: When trying to convert a plain distribute volume to replica-3 or arbiter type it is failing with ENOTCONN error as the lookup on the root will fail as there is no quorum. Fix: Allow lookup on root if it is coming from the ADD_REPLICA_MOUNT which is used while adding bricks to a volume. It will try to set the pending xattrs for the newly added bricks to allow the heal to happen in the right direction and avoid data loss scenarios. Note: This fix will solve the problem of type conversion only in the case where the volume was mounted at least once. The conversion of non mounted volumes will still fail since the dht selfheal tries to set the directory layout will fail as they do that with the PID GF_CLIENT_PID_NO_ROOT_SQUASH set in the frame->root. Change-Id: Ic511939981dad118cc946754341318b164954b3b fixes: bz#1655854 Signed-off-by: karthik-us <ksubrahm@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e9b30504a0c..ae6d4cedae1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -13837,7 +13837,7 @@ glusterd_handle_replicate_brick_ops(glusterd_volinfo_t *volinfo,
goto out;
}
- ret = gf_asprintf(&pid, "%d", GF_CLIENT_PID_SELF_HEALD);
+ ret = gf_asprintf(&pid, "%d", GF_CLIENT_PID_ADD_REPLICA_MOUNT);
if (ret < 0)
goto out;