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

Parser_execarg() prints help to stderr, usage to stdout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • 3
    • 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

        Issue Links

          Activity

            People

              aalyaev Aleksei Alyaev (Inactive)
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: