Bug 1255644

Summary: quota : display the size equivalent to the soft limit percentage in gluster v quota <volname> list* command
Product: [Community] GlusterFS Reporter: Manikandan <mselvaga>
Component: quotaAssignee: Manikandan <mselvaga>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.7.3CC: bugs, gluster-bugs, rtalur, smohan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1248521 Environment:
Last Closed: 2015-09-09 09:40:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1248521, 1271184    
Bug Blocks:    

Description Manikandan 2015-08-21 09:08:27 UTC
+++ This bug was initially created as a clone of Bug #1248521 +++

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Manikandan on 2015-07-30 08:59:15 EDT ---

Use case 1:

Currently, the "gluster v quota <volname> list <path>" outputs

For eg..,

[root@dhcp35-94 test]# gluster v quota vol1 list
                  Path                   Hard-limit  Soft-limit      Used  Available  Soft-limit exceeded? Hard-limit exceeded?
-------------------------------------------------------------------------------------------------------------------------------
/dir                                       5.0MB     80%          0Bytes   5.0MB              No                   No

Use case 2:

Also for "gluster v quota <volname> list-objects <path>" outputs,

For eg..,

[root@dhcp35-94 test]# gluster v quota vol1 list-objects /dir
                  Path                   Hard-limit   Soft-limit      Files       Dirs     Available  Soft-limit exceeded? Hard-limit exceeded?
-----------------------------------------------------------------------------------------------------------------------------------------------
/dir                                            10       80%          0          1          9              No                   No


It would be better if we could display the 80% soft limit equivalent value of the hard limit.

--- Additional comment from Anand Avati on 2015-07-30 09:06:45 EDT ---

REVIEW: http://review.gluster.org/11808 (quota : display the size of soft limit percentage) posted (#1) for review on master by Manikandan Selvaganesh (mselvaga)

--- Additional comment from Manikandan on 2015-07-30 09:17:12 EDT ---

With the above patch, 

"gluster v quota <volname> list <path>" command outputs,

[root@dhcp35-94 test]# gluster v quota vol1 list
                  Path                   Hard-limit  Soft-limit      Used  Available  Soft-limit exceeded? Hard-limit exceeded?
-------------------------------------------------------------------------------------------------------------------------------
/dir                                       1.0GB     60%(614.4MB)   0Bytes   1.0GB              No                   No

"gluster v quota <volname> list-objects <path>" command shows,

[root@dhcp35-94 test]# gluster v quota vol1 list-objects /dir
                  Path                   Hard-limit   Soft-limit      Files       Dirs     Available  Soft-limit exceeded? Hard-limit exceeded?
-----------------------------------------------------------------------------------------------------------------------------------------------
/dir                                            10       80%(8)          0          1          9              No                   No

--- Additional comment from Anand Avati on 2015-07-31 02:05:38 EDT ---

REVIEW: http://review.gluster.org/11808 (quota : display the size of soft limit percentage) posted (#2) for review on master by Manikandan Selvaganesh (mselvaga)

--- Additional comment from Anand Avati on 2015-08-02 23:29:14 EDT ---

REVIEW: http://review.gluster.org/11808 (quota : display the size of soft limit percentage) posted (#3) for review on master by Manikandan Selvaganesh (mselvaga)

--- Additional comment from Anand Avati on 2015-08-04 09:06:01 EDT ---

REVIEW: http://review.gluster.org/11808 (quota : display the size of soft limit percentage) posted (#4) for review on master by Manikandan Selvaganesh (mselvaga)

--- Additional comment from Anand Avati on 2015-08-12 03:29:03 EDT ---

REVIEW: http://review.gluster.org/11808 (quota : display the size of soft limit percentage) posted (#5) for review on master by Manikandan Selvaganesh (mselvaga)

--- Additional comment from Anand Avati on 2015-08-12 06:27:58 EDT ---

REVIEW: http://review.gluster.org/11808 (quota :display the size of soft limit percentage) posted (#6) for review on master by Manikandan Selvaganesh (mselvaga)

--- Additional comment from Anand Avati on 2015-08-13 01:12:47 EDT ---

REVIEW: http://review.gluster.org/11808 (quota :display the size of soft limit percentage) posted (#7) for review on master by Manikandan Selvaganesh (mselvaga)

--- Additional comment from Anand Avati on 2015-08-17 07:08:22 EDT ---

REVIEW: http://review.gluster.org/11808 (quota :display the size of soft limit percentage) posted (#8) for review on master by Manikandan Selvaganesh (mselvaga)

--- Additional comment from Anand Avati on 2015-08-20 07:11:23 EDT ---

REVIEW: http://review.gluster.org/11808 (quota :display the size of soft limit percentage) posted (#9) for review on master by Manikandan Selvaganesh (mselvaga)

Comment 1 Anand Avati 2015-08-21 09:23:31 UTC
REVIEW: http://review.gluster.org/11977 (quota :display the size of soft limit percentage) posted (#1) for review on release-3.7 by Manikandan Selvaganesh (mselvaga)

Comment 2 Anand Avati 2015-08-26 12:09:50 UTC
COMMIT: http://review.gluster.org/11977 committed in release-3.7 by Raghavendra G (rgowdapp) 
------
commit 7f346e567edb94b008a5f0fa9f614fa8a296636b
Author: Manikandan Selvaganesh <mselvaga>
Date:   Thu Jul 30 18:29:41 2015 +0530

    quota :display the size of soft limit percentage
    
    Display the size equivalent to the soft limit percentage
    in gluster v quota <volname> list <path> and
    gluster v quota <volname> list-objects <path> command
    
            Backport of http://review.gluster.org/#/c/11808/
    
    Cherry picked from commit b9e87f39386fc9c591c7698357c2899afc255b95
    > Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87
    > BUG: 1248521
    > Signed-off-by: Manikandan Selvaganesh <mselvaga>
    > Reviewed-on: http://review.gluster.org/11808
    > Tested-by: NetBSD Build System <jenkins.org>
    > Reviewed-by: Vijaikumar Mallikarjuna <vmallika>
    > Reviewed-by: Raghavendra G <rgowdapp>
    
    Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87
    BUG: 1255644
    Signed-off-by: Manikandan Selvaganesh <mselvaga>
    Reviewed-on: http://review.gluster.org/11977
    Tested-by: NetBSD Build System <jenkins.org>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra G <rgowdapp>

Comment 3 Kaushal 2015-09-09 09:40:21 UTC
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.7.4, please open a new bug report.

glusterfs-3.7.4 has been announced on the Gluster mailinglists [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://thread.gmane.org/gmane.comp.file-systems.gluster.devel/12496
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 4 Vijay Bellur 2015-10-12 09:54:30 UTC
REVIEW: http://review.gluster.org/12338 (cli : freeing the allocated memory) posted (#1) for review on release-3.7 by Manikandan Selvaganesh (mselvaga)

Comment 5 Vijay Bellur 2015-10-14 07:03:52 UTC
COMMIT: http://review.gluster.org/12338 committed in release-3.7 by Kaushal M (kaushal) 
------
commit 1722aabf0caa9059a38525ff71626df157187868
Author: Manikandan Selvaganesh <mselvaga>
Date:   Mon Oct 12 15:03:28 2015 +0530

    cli : freeing the allocated memory
    
    Backport of http://review.gluster.org/#/c/12337/
    
    > Change-Id: Ibcbad94c091a9c24fe5aff2d7e8bcd9ac88da7bf
    > BUG: 1248521
    > Signed-off-by: Manikandan Selvaganesh <mselvaga>
    
    Change-Id: Ibcbad94c091a9c24fe5aff2d7e8bcd9ac88da7bf
    BUG: 1255644
    Signed-off-by: Manikandan Selvaganesh <mselvaga>
    Reviewed-on: http://review.gluster.org/12338
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijaikumar Mallikarjuna <vmallika>
    Tested-by: NetBSD Build System <jenkins.org>
    Reviewed-by: Kaushal M <kaushal>