Bug 815190 - Make `gluster volume list' script friendly
Make `gluster volume list' script friendly
Product: GlusterFS
Classification: Community
Component: cli (Show other bugs)
Unspecified Unspecified
low Severity high
: ---
: ---
Assigned To: Amar Tumballi
Depends On:
Blocks: 817967
  Show dependency treegraph
Reported: 2012-04-23 01:00 EDT by Sachidananda Urs
Modified: 2013-12-18 19:08 EST (History)
2 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-24 13:43:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sachidananda Urs 2012-04-23 01:00:11 EDT
Currently `gluster volume list` prints:

[root@gqac026 ~]# gluster volume list
5 volumes present in cluster
        1. nfs-test-0
        2. nfs-test-3
        3. nfs-test-2
        4. lockt
        5. nfs-test-big

Making it script friendly is more useful. The number of volumes can be got by piping to `wc -l' and we can get the numbering by piping to nl. The above pretty printing is quite redundant when we can use some good old unix tools.

The proposed volume list could be like:

[root@gqac026 ~]# gluster volume list

So that I can script it. For eg:

var=`gluster volume list | grep big`
gluster volume start $var

so on...

Currently, if I need something like above I have to take all the pain of doing a sed/cut etc.
Comment 1 Anand Avati 2012-04-23 21:47:58 EDT
CHANGE: http://review.gluster.com/3207 (cli: fix the output of 'gluster volume list') merged in master by Anand Avati (avati@redhat.com)
Comment 2 Sachidananda Urs 2012-04-30 14:10:24 EDT
Works as expected on qa39

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