summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2020-04-11 08:56:24 +0530
committerMOHIT AGRAWAL <moagrawa@redhat.com>2020-07-30 06:54:58 +0000
commit62d6627a174a1e53511da6bc8947263148479017 (patch)
treece2c04eb129cbb8d1ca39099618d7fce67db2f2e /xlators/mgmt/glusterd/src/glusterd-replace-brick.c
parentba1b0a471dec968633f89c7f790b099fb4ad700d (diff)
glusterd/auth.allow : allow add-brick from peers
Problem: When auth.allow list is set to some ip's, add-brick operation is failing. Cause: add-brick commands creates a temparary mount on the bricks to set the extended attributes on the brick mount points. When auth.allow list is set to default i.e, * (all) we will not see any issue, but when it is set to certain ip's add-brick operation fails as temparory mount on the bricks fails because the peers are not part of auth.allow list. Solution: When auth.allow list is already set, add all the peers to the auth.allow list during add-brick operation. the old list will be replaced in post commit phase. As this can happen with replace-brick operation as well, added code to handle it. updates: #1391 Change-Id: I5ede8c35f05ab25ff431b88e074ddbe9c10a90f1 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-replace-brick.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index 3d13ef95ffd..43c2f4373e0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -239,6 +239,8 @@ glusterd_op_stage_replace_brick(dict_t *dict, char **op_errstr,
msg[0] = '\0';
}
+ glusterd_add_peers_to_auth_list(volname);
+
ret = glusterd_get_dst_brick_info(&dst_brick, volname, op_errstr,
&dst_brickinfo, &host, dict,
&dup_dstbrick);