Bug 1704661 - RFE - crictl completion is not enabled
Summary: RFE - crictl completion is not enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.6.0
Assignee: Peter Hunt
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-30 09:42 UTC by Tomáš Nožička
Modified: 2020-10-27 15:54 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 15:54:19 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 15:54:36 UTC

Description Tomáš Nožička 2019-04-30 09:42:00 UTC
Not sure if I chose the right component but it would be nice to enable crictl completion by default.

the bash command is `source <(crictl completion)`, it just needs to be placed into /etc/profile.d or similar. (Probably to the same config where oc completion is setup.)

Comment 2 Peter Hunt 2020-05-27 20:28:55 UTC
I have created a scratch build that solves this. I'd like that build to be reviewed before I do an official one. I will leave the target at 4.6 but the change is applied to 4.5 (crictl in 4.6 is the one in 4.5 right now anyway)

scratch build ref: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=28875867

Comment 3 Lokesh Mandvekar 2020-05-28 13:42:53 UTC
tab completion works for me with the build in Comment 2.

Comment 4 Peter Hunt 2020-05-28 14:12:54 UTC
the package cri-tools-1.18.0-3.el{7,8} now has completions

Comment 7 weiwei jiang 2020-06-05 01:48:45 UTC
Checked with cri-tools-1.18.0-3.el{7,8} , moved to verified.


# # RHEL 7 version
# rpm -q cri-tools
cri-tools-1.18.0-3.el7.x86_64
# rpm -ql cri-tools
/usr/bin/crictl
/usr/share/bash-completion/completions/crictl
/usr/share/doc/cri-tools-1.18.0
/usr/share/doc/cri-tools-1.18.0/CHANGELOG.md
/usr/share/doc/cri-tools-1.18.0/CONTRIBUTING.md
/usr/share/doc/cri-tools-1.18.0/OWNERS
/usr/share/doc/cri-tools-1.18.0/README.md
/usr/share/doc/cri-tools-1.18.0/RELEASE.md
/usr/share/doc/cri-tools-1.18.0/benchmark.md
/usr/share/doc/cri-tools-1.18.0/code-of-conduct.md
/usr/share/doc/cri-tools-1.18.0/roadmap.md
/usr/share/doc/cri-tools-1.18.0/validation.md
/usr/share/licenses/cri-tools-1.18.0
/usr/share/licenses/cri-tools-1.18.0/LICENSE
/usr/share/man/man1/crictl.1.gz
# crictl 
attach              create              help                imagefsinfo         inspect             pods                rm                  runp                stop                version             
completion          --debug             --help              images              inspecti            port-forward        rmi                 --runtime-endpoint  stopp               --version           
config              exec                image               img                 inspectp            ps                  rmp                 start               --timeout           
--config            h                   --image-endpoint    info                logs                pull                run                 stats               update   



# # RHEL 8 version
# rpm -q cri-tools
cri-tools-1.18.0-3.el8.x86_64
# rpm -ql cri-tools
/usr/bin/crictl
/usr/lib/.build-id
/usr/lib/.build-id/c0
/usr/lib/.build-id/c0/a7f8be05644ee08bffdbf6d6c6d1513d5d39ed
/usr/share/bash-completion/completions/crictl
/usr/share/doc/cri-tools
/usr/share/doc/cri-tools/CHANGELOG.md
/usr/share/doc/cri-tools/CONTRIBUTING.md
/usr/share/doc/cri-tools/OWNERS
/usr/share/doc/cri-tools/README.md
/usr/share/doc/cri-tools/RELEASE.md
/usr/share/doc/cri-tools/benchmark.md
/usr/share/doc/cri-tools/code-of-conduct.md
/usr/share/doc/cri-tools/roadmap.md
/usr/share/doc/cri-tools/validation.md
/usr/share/licenses/cri-tools
/usr/share/licenses/cri-tools/LICENSE
/usr/share/man/man1/crictl.1.gz
# crictl 
attach              create              --help              imagefsinfo         inspect             pods                rm                  runp                stop                --version           
completion          --debug             help                images              inspecti            port-forward        rmi                 --runtime-endpoint  stopp               version             
--config            exec                image               img                 inspectp            ps                  rmp                 start               --timeout           
config              h                   --image-endpoint    info                logs                pull                run                 stats               update

Comment 9 errata-xmlrpc 2020-10-27 15:54:19 UTC
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 (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.