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