Description of problem: When check crictl's man page, found subcommands section does not desplay well Version-Release number of selected component (if applicable): # oc version oc v3.11.0-0.14.0 kubernetes v1.11.0+d4cacc0 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://qe-wjiang-master-etcd-1:8443 openshift v3.11.0-0.14.0 kubernetes v1.11.0+d4cacc0 cri-tools-1.0.0-6.rhaos3.11.git78ec590.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. man crictl 2. 3. Actual results: Subcommands includes: 0 item attach: Attach to a running container item create: Create a new container item exec: Run a command in a running container item version: Display runtime version information item images: List images item inspect: Display the status of one or more containers item inspecti: Return the status of one ore more images item inspectp: Dis‐ play the status of one or more pods item logs: Fetch the logs of a container item port-forward: Forward local port to a pod item ps: List containers item pull: Pull an image from a registry item runp: Run a new pod item rm: Remove one or more containers item rmi: Remove one or more images item rmp: Remove one or more pods item pods: List pods item start: Start one or more created containers item info: Display information of the container runtime item stop: Stop one or more running containers item stopp: Stop one or more running pods item update: Update one or more running containers item config: Get and set crictl options item stats: List container(s) resource usage statistics item completion: Output bash shell completion code item help, h: Shows a list of commands or help for one command crictl connects to unix:///var/run/dockershim.sock by default. For other runtimes, the endpoint can be set in three ways: 0 item By setting flags --runtime-endpoint and --image-endpoint item By setting environment variables CONTAINER_RUNTIME_ENDPOINT and IMAGE_SERVICE_ENDPOINT item By setting the endpoint in the config file --config=/etc/crictl.yaml Additional options.IP 0 item --runtime-endpoint, -r: CRI server runtime endpoint (default: "unix:///var/run/dockershim.sock").The default server is dockershim. If we want to debug other CRI server such as frakti, we can add flag --runtime-endpoint=/var/run/frakti.sock item --image-endpoint, -i: CRI server image endpoint, default same as runtime endpoint. item --timeout, -t: Timeout of connecting to server (default: 10s) item --debug, -D: Enable debug output item --help, -h: show help item --version, -v: print the version information of crictl item --config, -c: Config file in yaml format. Overrided by flags or environment variables. Expected results: Should have good indent and no syntax error Additional info:
Checked with cri-tools-1.11.1-3.rhaos3.11.gitedabfb5.el7.x86_64, moved to verified. # lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 7.7 (Maipo) Release: 7.7 Codename: Maipo # rpm -q cri-tools cri-tools-1.11.1-3.rhaos3.11.gitedabfb5.el7.x86_64 # man crictl Container(Runtime) CLI Container(Runtime) crictl provides a CLI for CRI-compatible container runtimes. This allows the CRI runtime developers to debug their runtime without needing to set up Kubernetes components. crictl is currently in Beta and still under quick iterations. It is hosted at the cri-tools ⟨https://github.com/kubernetes-sigs/cri-tools⟩ repository. We encourage the CRI developers to report bugs or help extend the coverage by adding more functionalities. Install crictl crictl can be downloaded from cri-tools release page ⟨https://github.com/kubernetes-sigs/cri-tools/releases⟩: VERSION="v1.0.0-beta.1" wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin rm -f crictl-$VERSION-linux-amd64.tar.gz Usage crictl SUBCOMMAND [FLAGS] Subcommands includes: · attach: Attach to a running container · create: Create a new container · exec: Run a command in a running container · version: Display runtime version information · images: List images · inspect: Display the status of one or more containers · inspecti: Return the status of one ore more images · inspectp: Display the status of one or more pods · logs: Fetch the logs of a container · port-forward: Forward local port to a pod · ps: List containers · pull: Pull an image from a registry · runp: Run a new pod · rm: Remove one or more containers · rmi: Remove one or more images · rmp: Remove one or more pods · pods: List pods · start: Start one or more created containers · info: Display information of the container runtime · stop: Stop one or more running containers · stopp: Stop one or more running pods · update: Update one or more running containers · config: Get and set crictl options · stats: List container(s) resource usage statistics · completion: Output bash shell completion code · help, h: Shows a list of commands or help for one command crictl connects to unix:///var/run/dockershim.sock by default. For other runtimes, the endpoint can be set in three ways: · By setting flags --runtime-endpoint and --image-endpoint · By setting environment variables CONTAINER_RUNTIME_ENDPOINT and IMAGE_SERVICE_ENDPOINT · By setting the endpoint in the config file --config=/etc/crictl.yaml $ cat /etc/crictl.yaml runtime-endpoint: unix:///var/run/dockershim.sock image-endpoint: unix:///var/run/dockershim.sock timeout: 10 debug: true Additional options.IP · 2 --runtime-endpoint, -r: CRI server runtime endpoint (default: "unix:///var/run/dockershim.sock").The default server is dockershim. If we want to debug other CRI server such as frakti, we can add flag --runtime-endpoint=/var/run/frakti.sock · --image-endpoint, -i: CRI server image endpoint, default same as runtime endpoint. · --timeout, -t: Timeout of connecting to server (default: 10s) · --debug, -D: Enable debug output · --help, -h: show help · --version, -v: print the version information of crictl · --config, -c: Config file in yaml format. Overrided by flags or environment variables. Examples Run pod sandbox with config file $ cat pod-config.json { "metadata": { "name": "nginx-sandbox", "namespace": "default", "attempt": 1, "uid": "hdishd83djaidwnduwk28bcsb" }, "logDirectory": "/tmp", "linux": { } } $ crictl runp pod-config.json f84dd361f8dc51518ed291fbadd6db537b0496536c1d2d6c05ff943ce8c9a54f List pod sandboxes and check the sandbox is in Ready state: $ crictl pods POD ID CREATED STATE NAME NAMESPACE ATTEMPT f84dd361f8dc5 17 seconds ago Ready busybox-sandbox default 1 Pull a busybox image $ crictl pull busybox Image is up to date for busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47 List images and check the busybox image has been pulled: $ crictl images IMAGE TAG IMAGE ID SIZE busybox latest 8c811b4aec35f 1.15MB k8s.gcr.io/pause 3.1 da86e6ba6ca19 742kB Create container in the pod sandbox with config file $ cat pod-config.json { "metadata": { "name": "nginx-sandbox", "namespace": "default", "attempt": 1, "uid": "hdishd83djaidwnduwk28bcsb" }, "log_directory": "/tmp", "linux": { } } $ cat container-config.json { "metadata": { "name": "busybox" }, "image":{ "image": "busybox" }, "command": [ "top" ], "log_path":"busybox/0.log", "linux": { } } $ crictl create f84dd361f8dc51518ed291fbadd6db537b0496536c1d2d6c05ff943ce8c9a54f container-config.json pod-config.json 3e025dd50a72d956c4f14881fbb5b1080c9275674e95fb67f965f6478a957d60 List containers and check the container is in Created state: $ crictl ps -a CONTAINER ID IMAGE CREATED STATE NAME ATTEMPT 3e025dd50a72d busybox 32 seconds ago Created busybox 0 Start container $ crictl start 3e025dd50a72d956c4f14881fbb5b1080c9275674e95fb67f965f6478a957d60 3e025dd50a72d956c4f14881fbb5b1080c9275674e95fb67f965f6478a957d60 $ crictl ps CONTAINER ID IMAGE CREATED STATE NAME ATTEMPT 3e025dd50a72d busybox About a minute ago Running busybox 0 Exec a command in container crictl exec -i -t 3e025dd50a72d956c4f14881fbb5b1080c9275674e95fb67f965f6478a957d60 ls bin dev etc home proc root sys tmp usr var More information Visit kubernetes-sigs/cri-tools ⟨https://github.com/kubernetes-sigs/cri-tools⟩ for more information. (CRI) Interface Container(Runtime)
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, 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:2477