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.
Upstream patch: http://review.gluster.org/#/c/9779/
[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.
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
Doc-text looks good to me
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