Bug 1210256

Summary: gluster volume info --xml gives back incorrect typrStr in xml
Product: [Community] GlusterFS Reporter: M S Vishwanath Bhat <vbhat>
Component: cliAssignee: Atin Mukherjee <amukherj>
Status: CLOSED CURRENTRELEASE QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: urgent    
Version: 3.7.0CC: amukherj, bugs, ggarg, gluster-bugs, mzywusko, rkavunga, sasundar
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 04:56:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description M S Vishwanath Bhat 2015-04-09 09:52:44 UTC
Description of problem:
gluster volume info shows correct volume type string (Distributed-replicate), But xml output of the same command gives back wrong output. It gives "Distibuted-Stripe"


Version-Release number of selected component (if applicable):
[root@spitfire ~]# gluster --xml --version
glusterfs 3.7dev built on Apr  2 2015 01:05:39


This was actually built from http://download.gluster.org/pub/gluster/glusterfs/nightly/glusterfs/epel-6-x86_64/

How reproducible:
Always

Steps to Reproduce:
1. Create and start a volume.
2. Run gluster volume info --xml

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
  <opRet>0</opRet>
  <opErrno>0</opErrno>
  <opErrstr/>
  <volInfo>
    <volumes>
      <volume>
        <name>master</name>
        <id>bdf97bbc-7796-4941-9b98-209b94c3f583</id>
        <status>2</status>
        <statusStr>Stopped</statusStr>
        <brickCount>4</brickCount>
        <distCount>2</distCount>
        <stripeCount>1</stripeCount>
        <replicaCount>2</replicaCount>
        <disperseCount>0</disperseCount>
        <redundancyCount>0</redundancyCount>
        <type>6</type>
        <typeStr>Distributed-Stripe</typeStr>
        <transport>0</transport>
        <xlators/>
        <bricks>
...
...
...


Expected results:
You can see the typeStr is "Distributed-Stripe" But it should have been "Distributed-Replicate" as shown in volume info (human readable)

[root@spitfire ~]# gluster v i master
 
Volume Name: master
Type: Distributed-Replicate
Volume ID: bdf97bbc-7796-4941-9b98-209b94c3f583
Status: Stopped
Number of Bricks: 2 x 2 = 4
Transport-type: tcp



Additional info:
I have set the priority to high, because we parse this xml and volume info and make decisions on the type. We expect the volume info to be correct.

Comment 1 SATHEESARAN 2015-04-21 06:49:24 UTC
The fix http://review.gluster.org/#/c/10271/ is available and not yet merged in master as part of BZ 1212398

Once its merged in master, it would be ported to release 3.7 branch

Comment 2 Atin Mukherjee 2015-08-12 04:56:58 UTC
Fix http://review.gluster.org/10396 has been committed in 3.7 branch and has been released. Hence closing this bug.