312c9bafe1
Resolves: bz#1546717 bz#1557551 bz#1558948 bz#1561999 bz#1563804 Resolves: bz#1565015 bz#1565119 bz#1565399 bz#1565577 bz#1567100 Resolves: bz#1567899 bz#1568374 bz#1568969 bz#1569490 bz#1570514 Resolves: bz#1570541 bz#1570582 bz#1571645 bz#1572087 bz#1572585 Resolves: bz#1575895 Signed-off-by: Milind Changire <mchangir@redhat.com>
79 lines
3.0 KiB
Diff
79 lines
3.0 KiB
Diff
From 0652899ce703542fc7fd676f3fd80748395d7094 Mon Sep 17 00:00:00 2001
|
|
From: Sanoj Unnikrishnan <sunnikri@redhat.com>
|
|
Date: Wed, 9 May 2018 13:43:48 +0530
|
|
Subject: [PATCH 259/260] Quota: Turn on ssl for crawler clients if needed
|
|
|
|
Problem: Quota uses per brick client generated by
|
|
glusterd_generate_client_per_brick_volfile to crawl the
|
|
individual bricks. These clients were not being configured
|
|
with ssl if volume has client.ssl turned on.
|
|
|
|
Solution: turn on client.ssl if the volume has client.ssl
|
|
option set to on.
|
|
|
|
Upstream Reference:
|
|
> Change-Id: Id3a13d5110c4376d734480c42da1ce6844cc8240
|
|
> fixes: bz#1575858
|
|
> Reviewed on: https://review.gluster.org/#/c/19978/
|
|
|
|
BUG: 1557551
|
|
Change-Id: Id3a13d5110c4376d734480c42da1ce6844cc8240
|
|
Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>
|
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/138158
|
|
Reviewed-by: Hari Gowtham Gopal <hgowtham@redhat.com>
|
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
---
|
|
xlators/mgmt/glusterd/src/glusterd-volgen.c | 21 ++++++++++++++++++++-
|
|
1 file changed, 20 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
index 3926bd3..3d8ad77 100644
|
|
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
@@ -5726,6 +5726,8 @@ glusterd_generate_client_per_brick_volfile (glusterd_volinfo_t *volinfo)
|
|
dict_t *dict = NULL;
|
|
xlator_t *xl = NULL;
|
|
int ret = -1;
|
|
+ char *ssl_str = NULL;
|
|
+ gf_boolean_t ssl_bool = _gf_false;
|
|
|
|
dict = dict_new ();
|
|
if (!dict)
|
|
@@ -5733,7 +5735,22 @@ glusterd_generate_client_per_brick_volfile (glusterd_volinfo_t *volinfo)
|
|
|
|
ret = dict_set_uint32 (dict, "trusted-client", GF_CLIENT_TRUSTED);
|
|
if (ret)
|
|
- goto out;
|
|
+ goto free_dict;
|
|
+
|
|
+ if (dict_get_str(volinfo->dict, "client.ssl", &ssl_str) == 0) {
|
|
+ if (gf_string2boolean(ssl_str, &ssl_bool) == 0) {
|
|
+ if (ssl_bool) {
|
|
+ if (dict_set_dynstr_with_alloc(dict,
|
|
+ "client.ssl", "on") != 0) {
|
|
+ ret = -1;
|
|
+ goto free_dict;
|
|
+ }
|
|
+ }
|
|
+ } else {
|
|
+ ret = -1;
|
|
+ goto free_dict;
|
|
+ }
|
|
+ }
|
|
|
|
cds_list_for_each_entry (brick, &volinfo->bricks, brick_list) {
|
|
xl = volgen_graph_build_client (&graph, volinfo,
|
|
@@ -5760,6 +5777,8 @@ out:
|
|
if (ret)
|
|
volgen_graph_free (&graph);
|
|
|
|
+free_dict:
|
|
+
|
|
if (dict)
|
|
dict_unref (dict);
|
|
|
|
--
|
|
1.8.3.1
|
|
|