Bug 1324053 - quota/cli: quota list with path not working when limit is not set
Summary: quota/cli: quota list with path not working when limit is not set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: quota
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHGS 3.2.0
Assignee: Raghavendra G
QA Contact: Anil Shah
URL:
Whiteboard:
Depends On: 1323360
Blocks: 1323490 1351522
TreeView+ depends on / blocked
 
Reported: 2016-04-05 12:25 UTC by Vijaikumar Mallikarjuna
Modified: 2017-03-23 05:28 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.8.4-1
Doc Type: Bug Fix
Doc Text:
Clone Of: 1323360
Environment:
Last Closed: 2017-03-23 05:28:18 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0486 0 normal SHIPPED_LIVE Moderate: Red Hat Gluster Storage 3.2.0 security, bug fix, and enhancement update 2017-03-23 09:18:45 UTC

Description Vijaikumar Mallikarjuna 2016-04-05 12:25:02 UTC
+++ This bug was initially created as a clone of Bug #1323360 +++

When a quota limit is not set, 'quota list <path>' should still display the usage when a path parameter is specified.

# gluster volume quota vol1 list /
quota: No quota configured on volume vol1

# g;uster volume quota vol1 list-objects /
quota: No inode quota configured on volume vol1


We have specified a path '/' in quota list command and we are getting error 'No quota configured'

Expected result:
# gluster volume quota vol1 list-objects /
                  Path                   Hard-limit   Soft-limit      Files       Dirs     Available  Soft-limit exceeded? Hard-limit exceeded?
-----------------------------------------------------------------------------------------------------------------------------------------------
/                                              N/A       N/A          1          3         N/A             N/A                  N/A


# gluster volume quota vol1 list /
                  Path                   Hard-limit  Soft-limit      Used  Available  Soft-limit exceeded? Hard-limit exceeded?
-------------------------------------------------------------------------------------------------------------------------------
/                                           N/A        N/A          1.0MB       N/A             N/A                N/A

--- Additional comment from Vijaikumar Mallikarjuna on 2016-04-01 23:53:58 EDT ---

Here is the test-case:
1) create volume
2) enable quota, but do not set any limits
3) create some files
4) execute quota list with path specified at the end
   #gluster volume quota vol1 list /
   #gluster volume quota vol1 list-objects /

--- Additional comment from Vijay Bellur on 2016-04-01 23:57:06 EDT ---

REVIEW: http://review.gluster.org/13893 (quota/cli: display quota usage on path when limit not set) posted (#1) for review on master by Vijaikumar Mallikarjuna (vmallika)

--- Additional comment from Vijay Bellur on 2016-04-05 08:23:33 EDT ---

COMMIT: http://review.gluster.org/13893 committed in master by Vijaikumar Mallikarjuna (vmallika) 
------
commit b198cdd6a47a964a102e8e96dc0de34cd19c2fd5
Author: vmallika <vmallika>
Date:   Sat Apr 2 09:20:45 2016 +0530

    quota/cli: display quota usage on path when limit not set
    
    When a quota limit is not set, 'quota list <path>' should still display
    the usage when a path parameter is specified.
    
    Change-Id: Ida12d9c5e348fbd98db4d68d9324c623cbdd3dea
    BUG: 1323360
    Signed-off-by: vmallika <vmallika>
    Reviewed-on: http://review.gluster.org/13893
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Manikandan Selvaganesh <mselvaga>
    Reviewed-by: Raghavendra G <rgowdapp>
    Tested-by: Raghavendra G <rgowdapp>
    Smoke: Gluster Build System <jenkins.com>

Comment 2 Vijaikumar Mallikarjuna 2016-04-05 12:29:09 UTC
Patch merged upstream:
mainline: http://review.gluster.org/#/c/13893/
release-3.7: http://review.gluster.org/#/c/13895/

Comment 6 Atin Mukherjee 2016-09-17 15:00:35 UTC
Upstream mainline : http://review.gluster.org/13893
Upstream 3.8 : Available as part of branching from mainline

And the fix is available in rhgs-3.2.0 as part of rebase to GlusterFS 3.8.4.

Comment 10 Anil Shah 2016-10-25 05:52:50 UTC
[root@rhs-client46 ~]# gluster v info
 
Volume Name: arbvol
Type: Distributed-Replicate
Volume ID: b59349bc-0120-4b94-a714-21ada116124a
Status: Started
Snapshot Count: 0
Number of Bricks: 2 x (2 + 1) = 6
Transport-type: tcp
Bricks:
Brick1: 10.70.36.70:/rhs/brick1/b1
Brick2: 10.70.36.71:/rhs/brick1/b2
Brick3: 10.70.36.46:/rhs/brick1/b3 (arbiter)
Brick4: 10.70.44.7:/rhs/brick1/b4
Brick5: 10.70.36.70:/rhs/brick2/b5
Brick6: 10.70.36.71:/rhs/brick2/b6 (arbiter)
Options Reconfigured:
features.quota-deem-statfs: on
features.inode-quota: on
features.quota: on
transport.address-family: inet
performance.readdir-ahead: on
nfs.disable: on

==============================================================
[root@rhs-client46 ~]# gluster v quota arbvol list-object  /
                  Path                   Hard-limit   Soft-limit      Files       Dirs     Available  Soft-limit exceeded? Hard-limit exceeded?
-----------------------------------------------------------------------------------------------------------------------------------------------
/                                              N/A       N/A       1000          4         N/A             N/A                  N/A

[root@rhs-client46 ~]# gluster v quota arbvol list /
                  Path                   Hard-limit  Soft-limit      Used  Available  Soft-limit exceeded? Hard-limit exceeded?
-------------------------------------------------------------------------------------------------------------------------------
/                                           N/A        N/A          2.0GB       N/A             N/A                N/A

[root@rhs-client46 ~]# gluster v quota arbvol list /test
                  Path                   Hard-limit  Soft-limit      Used  Available  Soft-limit exceeded? Hard-limit exceeded?
-------------------------------------------------------------------------------------------------------------------------------
/test                                       N/A        N/A         0Bytes       N/A             N/A                N/A

[root@rhs-client46 ~]# gluster v quota arbvol list-object  /test
                  Path                   Hard-limit   Soft-limit      Files       Dirs     Available  Soft-limit exceeded? Hard-limit exceeded?
-----------------------------------------------------------------------------------------------------------------------------------------------
/test                                          N/A       N/A          0          1         N/A             N/A                  N/A


==========================================================================

[root@rhs-client46 ~]# gluster v quota arbvol list-object  /test/test1
                  Path                   Hard-limit   Soft-limit      Files       Dirs     Available  Soft-limit exceeded? Hard-limit exceeded?
-----------------------------------------------------------------------------------------------------------------------------------------------
/test/test1                                    N/A       N/A          0          1         N/A             N/A                  N/A


[root@rhs-client46 ~]# gluster v quota arbvol list   /test/test1
                  Path                   Hard-limit  Soft-limit      Used  Available  Soft-limit exceeded? Hard-limit exceeded?
-------------------------------------------------------------------------------------------------------------------------------
/test/test1                                 N/A        N/A         0Bytes       N/A             N/A                N/A


Bug verified on build glusterfs-3.8.4-2.el7rhgs.x86_64

Comment 12 errata-xmlrpc 2017-03-23 05:28:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0486.html


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