summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2015-08-03 13:57:37 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-08-11 02:59:56 -0700
commit8603ac80218d6161416fd0f3cca511ba09aef2c8 (patch)
treef1ea37a0a46c99e5827852f4a23974c094cb57e4 /xlators/mgmt/glusterd/src
parentc0da330c32312edc4233fe6f660ce8e218638fb5 (diff)
glusterd/rebalance: trusted rebalance volfile
Creating the client volfiles with GF_CLIENT_OTHER overwrites the trusted rebalance volfile and causes rebalance to fail if auth.allow is set. Now, we always set the value of trusted-client to GF_CLIENT_TRUSTED for rebalance volfiles. Change-Id: I95eb510256d18dfa9048f96a1aeb71cca4811811 BUG: 1248415 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/11819 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index f89a5302315..59bc0638608 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -4212,16 +4212,19 @@ build_rebalance_volfile (glusterd_volinfo_t *volinfo, char *filepath,
return 0;
}
+ set_dict = dict_copy (volinfo->dict, NULL);
+ if (!set_dict)
+ return -1;
+
if (mod_dict) {
- set_dict = dict_copy (volinfo->dict, NULL);
- if (!set_dict)
- return -1;
dict_copy (mod_dict, set_dict);
/* XXX dict_copy swallows errors */
- } else {
- set_dict = volinfo->dict;
}
+ /* Rebalance is always a trusted client*/
+ ret = dict_set_uint32 (set_dict, "trusted-client", GF_CLIENT_TRUSTED);
+ if (ret)
+ return -1;
ret = volgen_graph_build_clients (&graph, volinfo, set_dict, NULL);
if (volinfo->type == GF_CLUSTER_TYPE_TIER)
@@ -4251,13 +4254,12 @@ build_rebalance_volfile (glusterd_volinfo_t *volinfo, char *filepath,
out:
volgen_graph_free (&graph);
- if (mod_dict)
- dict_destroy (set_dict);
-
+ dict_destroy (set_dict);
return ret;
-
}
+
+
static int
build_shd_volume_graph (xlator_t *this, volgen_graph_t *graph,
glusterd_volinfo_t *volinfo,