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

Parser_execarg() prints help to stderr, usage to stdout

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

            [LU-8621] Parser_execarg() prints help to stderr, usage to stdout
            adilger Andreas Dilger made changes -
            Link New: This issue is related to ATM-2635 [ ATM-2635 ]
            bertschinger Thomas Bertschinger made changes -
            Link New: This issue is related to LU-16392 [ LU-16392 ]
            pjones Peter Jones made changes -
            Fix Version/s New: Lustre 2.16.0 [ 15190 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            jhammond John Hammond made changes -
            Assignee Original: WC Triage [ wc-triage ] New: Aleksei Alyaev [ aalyaev ]
            adilger Andreas Dilger made changes -
            Labels Original: utils New: easy utils
            adilger Andreas Dilger made changes -
            Link New: This issue is related to PP-269 [ PP-269 ]
            jhammond John Hammond created issue -

            People

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

              Dates

                Created:
                Updated:
                Resolved: