[Bugs] [Bug 1313968] New: Request for XML output ignored when stdin is not a tty

bugzilla at redhat.com bugzilla at redhat.com
Wed Mar 2 17:28:57 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1313968

            Bug ID: 1313968
           Summary: Request for XML output ignored when stdin is not a tty
           Product: GlusterFS
           Version: 3.5.9
         Component: cli
          Severity: medium
          Assignee: bugs at gluster.org
          Reporter: joe at julianfamily.org
                CC: bugs at gluster.org, gluster-bugs at redhat.com,
                    kaushal at redhat.com, mi+redhat at aldan.algebra.com



Please backport this fix to release-3.5


+++ This bug was initially created as a clone of Bug #1047378 +++

The --xml option now works in interactive mode -- where it is, perhaps, the
least useful. When launching gluster-utility from a script, however -- when the
stdin is not a tty -- the option is quietly ignored. Note, how the
cli_input_init() unconditionally overwrites the mode-field, when it detects a
non-tty input:

        if (isatty (STDIN_FILENO)) {
                state->prompt = "gluster> ";

                cli_rl_enable (state);
        } else {
                state->prompt = "";
                state->mode = GLUSTER_MODE_SCRIPT | GLUSTER_MODE_ERR_FATAL;
        }

Steps to Reproduce:
echo "volume list" | gluster --xml

Actual results:
List of volumes one per line.

Expected results:
XML-blob listing volumes.

--- Additional comment from Anand Avati on 2014-01-13 02:24:10 EST ---

REVIEW: http://review.gluster.org/6687 (cli: Don't override cli mode when stdin
in not a tty) posted (#1) for review on master by Kaushal M
(kaushal at redhat.com)

--- Additional comment from Anand Avati on 2014-01-13 04:15:07 EST ---

REVIEW: http://review.gluster.org/6687 (cli: Don't override cli mode when stdin
in not a tty) posted (#2) for review on master by Kaushal M
(kaushal at redhat.com)

--- Additional comment from Anand Avati on 2014-01-15 01:27:18 EST ---

COMMIT: http://review.gluster.org/6687 committed in master by Vijay Bellur
(vbellur at redhat.com) 
------
commit f139fc7e44da27670e90bd7ba55ff80e7c8b8ecd
Author: Kaushal M <kaushal at redhat.com>
Date:   Mon Jan 13 12:42:31 2014 +0530

    cli: Don't override cli mode when stdin in not a tty

    Change-Id: I801c6e6ecd6c5a91e487e8e54ec5f684d450a080
    BUG: 1047378
    Signed-off-by: Kaushal M <kaushal at redhat.com>
    Reviewed-on: http://review.gluster.org/6687
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Vijay Bellur <vbellur at redhat.com>

--- Additional comment from Niels de Vos on 2014-09-22 08:34:16 EDT ---

A beta release for GlusterFS 3.6.0 has been released. Please verify if the
release solves this bug report for you. In case the glusterfs-3.6.0beta1
release does not have a resolution for this issue, leave a comment in this bug
and move the status to ASSIGNED. If this release fixes the problem for you,
leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future.
Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an
"updates-testing" repository) infrastructure for your distribution.

[1]
http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

--- Additional comment from Niels de Vos on 2014-11-11 03:26:16 EST ---

This bug is getting closed because a release has been made available that
should address the reported issue. In case the problem is still not fixed with
glusterfs-3.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [1], packages for several distributions
should become available in the near future. Keep an eye on the Gluster Users
mailinglist [2] and the update infrastructure for your distribution.

[1]
http://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list