Bug 815190 - Make `gluster volume list' script friendly
Summary: Make `gluster volume list' script friendly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: pre-release
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 817967
TreeView+ depends on / blocked
 
Reported: 2012-04-23 05:00 UTC by Sachidananda Urs
Modified: 2013-12-19 00:08 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:43:34 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Sachidananda Urs 2012-04-23 05:00:11 UTC
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
nfs-test-0
nfs-test-3
nfs-test-2
lockt
nfs-test-big

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-24 01:47:58 UTC
CHANGE: http://review.gluster.com/3207 (cli: fix the output of 'gluster volume list') merged in master by Anand Avati (avati)

Comment 2 Sachidananda Urs 2012-04-30 18:10:24 UTC
Works as expected on qa39


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