Bug 1098787 - when compiled with --disable-xml-output "gluster" cli tool returns human readable output instead of error
Summary: when compiled with --disable-xml-output "gluster" cli tool returns human read...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: All
OS: All
medium
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-18 14:58 UTC by Peter Krempa
Modified: 2018-10-05 03:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-05 03:58:55 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
patch (977 bytes, patch)
2014-05-18 14:58 UTC, Peter Krempa
no flags Details | Diff

Description Peter Krempa 2014-05-18 14:58:50 UTC
Created attachment 896781 [details]
patch

Description of problem:
When XML output is requested (usually due to machine parsing) the cli tool returns human readable output if the XML output isn't compiled in. The human readable output will not be parsed by XML parsers.

Version-Release number of selected component (if applicable):
3.5.0, 3.4.0 and possibly others

How reproducible:
100%

Steps to Reproduce:
1. have the CLI tool compiled with --disable-xml-output
2. try to run cli with XML output

Actual results:
$ ./gluster --xml volume info
XML output not supported. Ignoring '--xml' option
 
Volume Name: gv0
Type: Distribute
Volume ID: 1784c1e7-45ed-448e-815b-84c668971ce0
Status: Started
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: gluster-node-1:/mnt/gluster-brick
Options Reconfigured:
auth.allow: *
nfs.rpc-auth-allow: *
server.allow-insecure: on
$ echo $?
0

Expected results:
$ ./gluster --xml volume info
XML output not supported.
$ echo $?
1

Additional info:
See attached patch for suggested fix.

Comment 2 Atin Mukherjee 2018-10-05 03:58:55 UTC
You shouldn't be seeing this behavior any longer. Please give it a try with the latest releases.


Note You need to log in before you can comment on or make changes to this bug.