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

Bash completion regressions, lctl and lfs

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • Lustre 2.16.0
    • None
    • 3
    • 9223372036854775807

    Description

      There are a few regressions introduced in the bash completions for lctl and lfs.

      1. Attempting completion for lctl prints a message to stderr and does not generate any completions. To test this behavior interactively, type lctl <tab>. To test this behavior programmatically, run

      source lustre/scripts/bash-completion/lustre; COMPLETIONS=$( _lustre_cmds lctl) && [ ! -z "$COMPLETIONS" ]

      An exit status of 1 indicates the bug is present.

       

      2. Completion for lfs check gives incorrect results.

       

      3. Attempting completion for lfs find -component-flags erroneously prints a message to stderr.

      Attachments

        Issue Links

          Activity

            [LU-16392] Bash completion regressions, lctl and lfs
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-9830 [ LU-9830 ]
            pjones Peter Jones made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            pjones Peter Jones added a comment -

            Landed for 2.16

            pjones Peter Jones added a comment - Landed for 2.16

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49484/
            Subject: LU-16392 utils: use --list-commands for bash completion
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: b4cc570ad11c1c07a6e1d825787ccc62c1245ca1

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49484/ Subject: LU-16392 utils: use --list-commands for bash completion Project: fs/lustre-release Branch: master Current Patch Set: Commit: b4cc570ad11c1c07a6e1d825787ccc62c1245ca1
            pjones Peter Jones made changes -
            Assignee Original: WC Triage [ wc-triage ] New: Thomas Bertschinger [ bertschinger ]
            pjones Peter Jones added a comment -

            Does not affect b2_15- just master 

            pjones Peter Jones added a comment - Does not affect b2_15- just master 
            pjones Peter Jones made changes -
            Fix Version/s Original: Lustre 2.15.2 [ 15991 ]

            "Thomas Bertschinger <bertschinger@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49484
            Subject: LU-16392 utils: use --list-commands for bash completion
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 7c02a52fd57e2a0fa7e35c6cf3dad16ba12cb8d1

            gerrit Gerrit Updater added a comment - "Thomas Bertschinger <bertschinger@lanl.gov>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49484 Subject: LU-16392 utils: use --list-commands for bash completion Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7c02a52fd57e2a0fa7e35c6cf3dad16ba12cb8d1

            For the sub-commands, is it possible to list only the top-level command, and then add eg. "lctl pcc --list-commands" to generate the list of sub commands for the completion (ie. it passes the sub-command as well, not just "lctl --list-commands").?

            Also, in a semi-related note, I'm not sure why "--list-commands" was used here instead of using "--help" to get this list, but it would be good to allow both (though "--list-commands" should be used for the completions since it has existed much longer).

            adilger Andreas Dilger added a comment - For the sub-commands, is it possible to list only the top-level command, and then add eg. " lctl pcc --list-commands " to generate the list of sub commands for the completion (ie. it passes the sub-command as well, not just " lctl --list-commands ").? Also, in a semi-related note, I'm not sure why " --list-commands " was used here instead of using " --help " to get this list, but it would be good to allow both (though " --list-commands " should be used for the completions since it has existed much longer).

            I was looking at the command truncation issue as well. It looks like we are out by only a character or two in a few rare cases. It would be better to misalign the output by a few characters to fit in the longest options I think, rather than creating a new option.

            adilger Andreas Dilger added a comment - I was looking at the command truncation issue as well. It looks like we are out by only a character or two in a few rare cases. It would be better to misalign the output by a few characters to fit in the longest options I think, rather than creating a new option.

            People

              bertschinger Thomas Bertschinger
              bertschinger Thomas Bertschinger
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: