glusterfs/0514-glusterd-display-gluster-volume-status-when-quorum-t.patch
Milind Changire 2f3c8edfdf autobuild v3.12.2-41
Resolves: bz#1390151 bz#1410145 bz#1429190 bz#1510752 bz#1511779
Resolves: bz#1570958 bz#1574490 bz#1595246 bz#1618669 bz#1661393
Resolves: bz#1668989 bz#1669020
Signed-off-by: Milind Changire <mchangir@redhat.com>
2019-02-11 20:46:22 -05:00

50 lines
1.7 KiB
Diff

From 4413ccd6818a8680c74bc072b784319ce8d8429f Mon Sep 17 00:00:00 2001
From: Sanju Rakonde <srakonde@redhat.com>
Date: Thu, 9 Nov 2017 13:15:51 +0530
Subject: [PATCH 514/529] glusterd: display gluster volume status, when quorum
type is server
Problem: when server-quorum-type is server, after restarting glusterd
in the node which is up, gluster volume status is giving incorrect
information.
Fix: check whether server is blank, before adding other keys into the
dictionary.
upstream patch: https://review.gluster.org/#/c/glusterfs/+/18703/
>Change-Id: I926ebdffab330ccef844f23f6d6556e137914047
>BUG: 1511339
>Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Change-Id: I926ebdffab330ccef844f23f6d6556e137914047
BUG: 1574490
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/162399
Tested-by: RHGS Build Bot <nigelb@redhat.com>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
---
xlators/mgmt/glusterd/src/glusterd-utils.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e21ec4e..bafc3af 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -5204,6 +5204,12 @@ glusterd_add_node_to_dict (char *server, dict_t *dict, int count,
* the brick as hostname+path, so this will make more sense
* when output.
*/
+
+ if (!strcmp(server, "")) {
+ ret = 0;
+ goto out;
+ }
+
snprintf (key, sizeof (key), "brick%d.hostname", count);
if (!strcmp (server, priv->nfs_svc.name))
ret = dict_set_str (dict, key, "NFS Server");
--
1.8.3.1