diff options
author | Ravishankar N <ravishankar@redhat.com> | 2016-08-11 10:10:25 +0000 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-08-12 19:45:06 -0700 |
commit | a027be1229eb68ce1bbf8b4092673c80bf4a18fc (patch) | |
tree | 065c77ebf842ba3e2b87826f20d14d4b07f63108 /heal | |
parent | 4ede257b2adc9dfc7cc4e368a1c1ab4149192839 (diff) |
glfsheal: print brick name and path even when brick is down
Backport of http://review.gluster.org/#/c/15146/
The xml variant of heal info command does not display brick name when
the brick is down due to a failure to fetch the hostUUID. But the non
xml variant does. So fixed the xml variant to print the remote_host
and remote_subvol even when the brick is down.
Change-Id: I16347eb4455b9bcc7a9b0127f8783140b6016578
BUG: 1366489
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
(cherry picked from commit 5ef32c57f327e1dd4e9d227b9c8fd4b6f6fb4970)
Reviewed-on: http://review.gluster.org/15156
Reviewed-by: Anuradha Talur <atalur@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'heal')
-rw-r--r-- | heal/src/glfs-heal.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c index 9865f53ce51..0a880cb752e 100644 --- a/heal/src/glfs-heal.c +++ b/heal/src/glfs-heal.c @@ -263,15 +263,11 @@ print: (xmlChar *)"hostUuid", "%s", uuid?uuid:"-"); XML_RET_CHECK_AND_GOTO (x_ret, xml_out); - if (ret < 0) { - x_ret = xmlTextWriterWriteFormatElement (glfsh_writer, - (xmlChar *)"name", "%s", "information not available"); - XML_RET_CHECK_AND_GOTO (x_ret, xml_out); - } else { - x_ret = xmlTextWriterWriteFormatElement (glfsh_writer, - (xmlChar *)"name", "%s:%s", remote_host, remote_subvol); - XML_RET_CHECK_AND_GOTO (x_ret, xml_out); - } + x_ret = xmlTextWriterWriteFormatElement (glfsh_writer, + (xmlChar *)"name", "%s:%s", + remote_host ? remote_host : "-", + remote_subvol ? remote_subvol : "-"); + XML_RET_CHECK_AND_GOTO (x_ret, xml_out); xml_out: return ret; } |