Description of problem: cli to enable inode-quota is limit-objects, however cli accepts limit-object as valid input. Version-Release number of selected component (if applicable): glusterfs-server-3.8.4-13.el7rhgs.x86_64 How reproducible: 100% Steps to Reproduce: 1. create distribute-replicate volume 2. enable quota and set inode limit giving limit-object 3. run list-object command Actual results: cli accepts limit-object as valid input Expected results: cli shouldn't accept limit-object as valid input Additional info: [root@rhs-client46 /]# gluster v quota vol0 limit-object / 10 volume quota : success [root@rhs-client46 /]# gluster v quota vol0 limit-objects / 10 volume quota : success [root@rhs-client46 /]# gluster v quota vol0 list-object Path Hard-limit Soft-limit Files Dirs Available Soft-limit exceeded? Hard-limit exceeded? ----------------------------------------------------------------------------------------------------------------------------------------------- / 10 80%(8) 1000 3 0 Yes Yes [root@rhs-client46 /]# gluster v quota vol0 list-objects Path Hard-limit Soft-limit Files Dirs Available Soft-limit exceeded? Hard-limit exceeded? ----------------------------------------------------------------------------------------------------------------------------------------------- / 10 80%(8) 1000 3 0 Yes Yes
This is due to the way the command line is filtered/parsed. limit-o will also get matched as limit-objects since it is the only valid command starting with "limit-o".. Essentially any supplied command will be matched as a prefix against any valid commands. if it matches as a prefix to only one command then it is considered as that command. Another example: add-bri instead of add-brick. [root@dhcp35-100 glusterfs]# gluster v add-bri v1 self:/export/b3 force volume add-brick: success I do not see an issue with this behaviour.