a3470f
From 261a0b3feb520f7992dc026856b4b200670900ab Mon Sep 17 00:00:00 2001
a3470f
From: Sanju Rakonde <srakonde@redhat.com>
a3470f
Date: Sun, 13 May 2018 21:03:12 +0530
a3470f
Subject: [PATCH 271/271] cli: Fix for gluster volume info --xml
a3470f
a3470f
Problem: gluster volume info --xml is showing same uuid to all
a3470f
the bricks of a tier volume.
a3470f
a3470f
Solution: While iterating over hot/cold bricks of a tier volume, use
a3470f
correct iterator.
a3470f
a3470f
>Fixes: bz#1577627
a3470f
>Change-Id: Icf6a9c2a10b9da453abc262a57b7884d6638e3ed
a3470f
>Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
a3470f
a3470f
upstream patch: https://review.gluster.org/#/c/20015/
a3470f
a3470f
BUG: 1572043
a3470f
Change-Id: Icf6a9c2a10b9da453abc262a57b7884d6638e3ed
a3470f
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
a3470f
Reviewed-on: https://code.engineering.redhat.com/gerrit/138786
a3470f
Tested-by: RHGS Build Bot <nigelb@redhat.com>
a3470f
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
a3470f
---
a3470f
 cli/src/cli-xml-output.c | 4 ++--
a3470f
 1 file changed, 2 insertions(+), 2 deletions(-)
a3470f
a3470f
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
a3470f
index 29ee81b..a709ed5 100644
a3470f
--- a/cli/src/cli-xml-output.c
a3470f
+++ b/cli/src/cli-xml-output.c
a3470f
@@ -2942,7 +2942,7 @@ cli_xml_output_vol_info (cli_local_t *local, dict_t *dict)
a3470f
 
a3470f
                                 memset (key, 0, sizeof (key));
a3470f
                                 snprintf (key, sizeof (key),
a3470f
-                                          "volume%d.brick%d.uuid", i, j);
a3470f
+                                          "volume%d.brick%d.uuid", i, index);
a3470f
                                 ret = dict_get_str (dict, key, &uuid);
a3470f
                                 if (ret)
a3470f
                                         goto out;
a3470f
@@ -3053,7 +3053,7 @@ cli_xml_output_vol_info (cli_local_t *local, dict_t *dict)
a3470f
 
a3470f
                                 memset (key, 0, sizeof (key));
a3470f
                                 snprintf (key, sizeof (key),
a3470f
-                                          "volume%d.brick%d.uuid", i, j);
a3470f
+                                          "volume%d.brick%d.uuid", i, index);
a3470f
                                 ret = dict_get_str (dict, key, &uuid);
a3470f
                                 if (ret)
a3470f
                                         goto out;
a3470f
-- 
a3470f
1.8.3.1
a3470f