Bug 974055

Summary: quota: list output "Available" field displayed the result in PB instead of GB.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Saurabh <saujain>
Component: glusterdAssignee: Krutika Dhananjay <kdhananj>
Status: CLOSED ERRATA QA Contact: Saurabh <saujain>
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: amarts, kdhananj, mzywusko, rhs-bugs, sgowda, shaines, vbellur, vshastry
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-23 22:39:50 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:

Description Saurabh 2013-06-13 11:07:34 UTC
Description of problem:
changed the soft-limit from defualt of 80% to 90%.

created some files on the mount point

executed the command quota list, and at one point it displayed the "Available" limit to be in PBs.

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

[root@nfs2 ~]# rpm -qa | grep glusterfs
glusterfs-3.4rhs-1.el6rhs.x86_64
glusterfs-fuse-3.4rhs-1.el6rhs.x86_64
glusterfs-server-3.4rhs-1.el6rhs.x86_64


How reproducible:
seen once(even tried only once)

Steps to Reproduce:
1. create a volume 6x2, start it.
2. enable quota,
3. gluster volume quota <volume-name> / 2GB
4. mount -t glusterfs server-ip:<vol-name> <mnt-point>
5. create files of size 1MB till 1GB of space is filled.
6. change the default value of 80% to 90%.
7. create the files 2GB of space.
8. meanwhile try to execute a quota list command on the volume.

Actual results:
[root@nfs2 ~]# gluster volume quota dit-rep list
	Path		 Hard-limit	 Soft-limit	 Used	 Available
----------------------------------------------------------------------------------
/                           2GB        80%              184.0MB                1.8GB
[root@nfs2 ~]# 
[root@nfs2 ~]# gluster volume quota dit-rep help
Usage: volume quota <VOLNAME> {enable|disable|list [<path> ...]|remove {<path>}} |
volume quota <VOLNAME> {limit-usage|soft-limit} {<path>} {<value>} |
volume quota <VOLNAME> {alert-time|soft-timeout|hard-timeout} {<value>}
[root@nfs2 ~]# 
[root@nfs2 ~]# 
[root@nfs2 ~]# gluster volume quota dit-rep soft-limit / 90%
soft limit set on /
[root@nfs2 ~]# gluster volume quota dit-rep list
	Path		 Hard-limit	 Soft-limit	 Used	 Available
----------------------------------------------------------------------------------
/                           2GB        90%              351.0MB                1.7GB
[root@nfs2 ~]# 
[root@nfs2 ~]# gluster volume quota dit-rep list
	Path		 Hard-limit	 Soft-limit	 Used	 Available
----------------------------------------------------------------------------------
/                           2GB        90%                2.0GB            16384.0PB
[root@nfs2 ~]# 
[root@nfs2 ~]# gluster volume quota dit-rep list
	Path		 Hard-limit	 Soft-limit	 Used	 Available
----------------------------------------------------------------------------------
/                           2GB        90%              372.0MB                1.6GB
[root@nfs2 ~]# 
[root@nfs2 ~]# gluster volume quota dit-rep list
	Path		 Hard-limit	 Soft-limit	 Used	 Available
----------------------------------------------------------------------------------
/                           2GB        90%              372.0MB                1.6GB
[root@nfs2 ~]# 


Expected results:
The "Available" if displyed should not throw some vague number.

Additional info:

Comment 7 Saurabh 2013-09-10 06:31:23 UTC
haven't seen on glusterfs-3.4.0.33rhs-1

Comment 8 Scott Haines 2013-09-23 22:39:50 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.

http://rhn.redhat.com/errata/RHBA-2013-1262.html

Comment 9 Scott Haines 2013-09-23 22:43:48 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.

http://rhn.redhat.com/errata/RHBA-2013-1262.html