Bug 1023416 - quota: limit set cli issues with setting in Bytes(B) or without providing the type(size)
Summary: quota: limit set cli issues with setting in Bytes(B) or without providing the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: quota
Version: 2.1
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: RHGS 3.1.0
Assignee: Vijaikumar Mallikarjuna
QA Contact: Anil Shah
URL:
Whiteboard:
Depends On:
Blocks: 1202842 1223636
TreeView+ depends on / blocked
 
Reported: 2013-10-25 11:28 UTC by Rahul Hinduja
Modified: 2016-09-17 12:40 UTC (History)
9 users (show)

Fixed In Version: gluster-3.7.0-2.el6rhs
Doc Type: Bug Fix
Doc Text:
Previously, when setting the limit usage to 1B failed. With this fix, the issue is resolved.
Clone Of:
: 1197593 (view as bug list)
Environment:
Last Closed: 2015-07-29 04:29:19 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1495 0 normal SHIPPED_LIVE Important: Red Hat Gluster Storage 3.1 update 2015-07-29 08:26:26 UTC

Description Rahul Hinduja 2013-10-25 11:28:17 UTC
Description of problem:
=======================

While trying to set the limit-usage in Bytes (xB) it fails with the usage, but if we do not provide any storage type like (1) it considers it as 1B.

I am not sure if we should allow such small values to be set. But if 1 is allowed to be set and it translates to 1B , than 1B should also be allowed to set explicitly. 

[root@dj ~]# gluster volume quota vol-dr limit-usage / 1B
Please enter a correct value
Usage: volume quota <VOLNAME> {enable|disable|list [<path> ...]|remove <path>| default-soft-limit <percent>} |
volume quota <VOLNAME> {limit-usage <path> <size> [<percent>]} |
volume quota <VOLNAME> {alert-time|soft-timeout|hard-timeout} {<time>}
[root@dj ~]# 
[root@dj ~]# gluster volume quota vol-dr limit-usage / 1
volume quota : success
[root@dj ~]# 
[root@dj ~]# gluster volume quota vol-dr list
                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                         1Bytes       80%     986.3MB  0Bytes
[root@dj ~]# 
[root@dj ~]# gluster volume quota vol-dr limit-usage / 1b
Please enter a correct value
Usage: volume quota <VOLNAME> {enable|disable|list [<path> ...]|remove <path>| default-soft-limit <percent>} |
volume quota <VOLNAME> {limit-usage <path> <size> [<percent>]} |
volume quota <VOLNAME> {alert-time|soft-timeout|hard-timeout} {<time>}
[root@dj ~]# 

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

glusterfs-server-3.4.0.36rhs-1.el6rhs.x86_64


How reproducible:
=================

1/1


Steps to Reproduce:
===================
1. gluster volume quota vol-dr limit-usage / 1B  <<-Fails
2. gluster volume quota vol-dr limit-usage / 1   <<-Pass


Actual results:
===============


[root@dj ~]# gluster volume quota vol-dr limit-usage / 1B
Please enter a correct value
Usage: volume quota <VOLNAME> {enable|disable|list [<path> ...]|remove <path>| default-soft-limit <percent>} |
volume quota <VOLNAME> {limit-usage <path> <size> [<percent>]} |
volume quota <VOLNAME> {alert-time|soft-timeout|hard-timeout} {<time>}
[root@dj ~]# 
[root@dj ~]# gluster volume quota vol-dr limit-usage / 1
volume quota : success
[root@dj ~]# 
[root@dj ~]# gluster volume quota vol-dr list
                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                         1Bytes       80%     986.3MB  0Bytes
[root@dj ~]# 

Expected results:
=================

Should be consistent, if just 1 is converted into 1B than it should allow to set 1B explicitly.

Comment 2 Vijaikumar Mallikarjuna 2015-03-02 07:46:33 UTC
Upstream patch: http://review.gluster.org/#/c/9779/

Comment 4 Anil Shah 2015-05-28 06:01:48 UTC
[root@darkknight ~]# gluster v quota vol0 limit-usage / 1B
volume quota : success

[root@darkknight ~]# gluster v quota vol0 limit-usage /test 1
volume quota : success

[root@darkknight ~]# gluster v quota vol0 list
                  Path                   Hard-limit Soft-limit   Used  Available  Soft-limit exceeded? Hard-limit exceeded?
---------------------------------------------------------------------------------------------------------------------------
/                                         1Bytes       80%      0Bytes  1Bytes              No                   No
/test                                     1Bytes       80%      0Bytes  1Bytes              No                   No
[root@darkknight ~]# 

Bug successfully verified on build glusterfs 3.7.0.
Hence marking this bug as verified.

Comment 5 Bhavana 2015-07-25 08:06:05 UTC
Hi Vijai,

The doc text is updated. Please review the same and share your technical review comments. If it looks ok, then sign-off on the same.

Regards,
Bhavana

Comment 6 Vijaikumar Mallikarjuna 2015-07-27 04:35:40 UTC
Doc-text looks good to me

Comment 8 errata-xmlrpc 2015-07-29 04:29:19 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-2015-1495.html


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