Bug 1023416 - quota: limit set cli issues with setting in Bytes(B) or without providing the type(size)
quota: limit set cli issues with setting in Bytes(B) or without providing the...
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: quota (Show other bugs)
2.1
x86_64 Linux
low Severity medium
: ---
: RHGS 3.1.0
Assigned To: Vijaikumar Mallikarjuna
Anil Shah
: EasyFix
Depends On:
Blocks: 1202842 1223636
  Show dependency treegraph
 
Reported: 2013-10-25 07:28 EDT by Rahul Hinduja
Modified: 2016-09-17 08:40 EDT (History)
9 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 1197593 (view as bug list)
Environment:
Last Closed: 2015-07-29 00:29:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rahul Hinduja 2013-10-25 07:28:17 EDT
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 02:46:33 EST
Upstream patch: http://review.gluster.org/#/c/9779/
Comment 4 Anil Shah 2015-05-28 02:01:48 EDT
[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 04:06:05 EDT
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 00:35:40 EDT
Doc-text looks good to me
Comment 8 errata-xmlrpc 2015-07-29 00:29:19 EDT
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.