Description of problem: The return value of the quota help command, upon successful printing of help text should be 0 not 1 [root@boggs ~]# gluster volume quota pure_gold help >/dev/null 2>&1 [root@boggs ~]# echo $? 1 For example: [root@boggs ~]# glusterfs --help >/dev/null 2>&1 [root@boggs ~]# echo $? 0 Version-Release number of selected component (if applicable): glusterfs 3.4.0.33rhs How reproducible: Always. Actual results: return value of help command is 1 Expected results: return value of help command should be 0 Additional info: Standard Unix utilities return 0 as a convention. [root@boggs ~]# ls --help >/dev/null [root@boggs ~]# echo $? 0 [root@boggs ~]# dd --help > /dev/null [root@boggs ~]# echo $? 0 [root@boggs ~]#
If help is displayed as part of a syntax mistake, 1 is a valid return value. But not for `help' command in itself. [root@boggs ~]# gluster volume quota pure_gold default-soft-limit 50 a 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@boggs ~]# echo $? 1
Quota does not actually have any 'help' subcommand. The usage message displayed is because of parse failure, because 'help' is not a known option. This is similar to what happens when you give unknown options to other commands as well. For eg., in volume profile, # gluster volume profile test help Usage: volume profile <VOLNAME> {start|stop|info [nfs]} # echo $? 1 Sac, do you still feel we need to correct this? If so then it must be done for all commands, not just quota.
Doing it to all commands is useful. However, can't we print something like: quota help: subcmd not found Usage: It is quite misleading.
Patch posted for review on branch rhs-2.1 : https://code.engineering.redhat.com/gerrit/#/c/13767/2 Patch posted for review on branch rhs-2.1-u1 : https://code.engineering.redhat.com/gerrit/#/c/13771/
hi Anuradha, Can you please review the edited doc text for this bug? Once you sign off, this text will be added to the errata.
Hi Pavithra, The doc text has all the required info. It can be added to the errata.
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-1769.html