Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-8621

Parser_execarg() prints help to stderr, usage to stdout

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Severity:
      3
    • Rank (Obsolete):
      9223372036854775807

      Description

      When running lfs CMD --help or lctl CMD --help the help message is printed to stderr. By convention stdout should be used instead.

      When using lfs or lctl, if an unrecognized command is passed to Parser_execarg() we get a 100+ line usage message printed to stdout.

      # lctl barf
      Try interactive use without arguments or use one of:
      "===== metacommands ======="
      "--device"
      "--ignore_errors"
      "ignore_errors"
      "======== control ========="
      "help"
      "lustre_build_version"
      "exit"
      "quit"
      ...
      "llog_print"
      "llog_check"
      "llog_cancel"
      "llog_remove"
      "add_interface"
      "del_interface"
      "add_route"
      "del_route"
      "set_route"
      as argument.
      
      1. We shouldn't spam the terminal with so many lines of output for an unrecognized command.
      2. We need to print the command that was passed.
        # git barf
        git: 'barf' is not a git command. See 'git --help'.
        
        Did you mean this?
        	branch
        

        Attachments

          Activity

            People

            • Assignee:
              wc-triage WC Triage
              Reporter:
              jhammond John Hammond
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: