Description of problem: Help text produced by "oc virt" commands references itself using several variation which appear incorrect to me. Essentially, if you run "oc virt" without arguments which kubectl-virtctl exists in the command line the last two lines are: Use "kubectl virt <command> --help" for more information about a given command. Use "kubectl virt options" for a list of global command-line options (applies to all commands). However if you rename it to oc-virt and run "oc virt" again it becomes: Use "virtctl <command> --help" for more information about a given command. Use "virtctl options" for a list of global command-line options (applies to all commands). Neither of which appear to be correct to me since it was invoked with "oc virt" Version-Release number of selected component (if applicable): [kni@worker-3 bin]$ oc virt version Client Version: version.Info{GitVersion:"v0.26.1", GitCommit:"e40ff7965e2aadbf21131626dfa3be85524e3a2c", GitTreeState:"clean", BuildDate:"2020-02-19T16:16:36Z", GoVersion:"go1.12.8", Compiler:"gc", Platform:"linux/amd64"} How reproducible: Steps to Reproduce: 1. Ensure the virtctl exists on the command line with either the name "oc-virt" or "kubectl-virt" 2. run "oc virt" without arguments to produce help text. Actual results: see above, command line present in help text output appears to vary. In the case of naming the executable "oc-virt" it refers to itself as "virtctl" even if an executable with that name doesn't exist: [....snip....] Use "virtctl <command> --help" for more information about a given command. Use "virtctl options" for a list of global command-line options (applies to all commands). [kni@worker-3 bin]$ which virtctl /usr/bin/which: no virtctl in (/home/kni/.local/bin:/home/kni/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin) Expected results: The help text includes an executable name as it was invoked instead of looking at what the executable might be named.
@Stu, should this be assigned to virt?
Re-assigning to Virtualization as the affected component is command line based.
How exactly is the virtctl binary delivered to the user d/s? My guess is that the binary is somehow delivered named as `oc-virt` and the kubectl/oc plugin mechanism is used to integrate it with oc binary? Then the easiest fix would be to adjust the logic to check how the binary itself is named and in case of any form of virtctl -> Help text uses `virtctl...` kubectl-virt -> Help text uses `kubectl virt...` oc-virt -> Help text uses `oc virt...`
Created u/s PR https://github.com/kubevirt/kubevirt/pull/4265 to address this.
Sorry I was on PTO last week. Do you still need this info?
Yes, please. We need to find out if the proposed fix would apply.
It's installed via the kubevirt-virtctl package: [root@worker-3 ~]# rpm -ql kubevirt-virtctl /usr/bin/virtctl [root@worker-3 ~]# rpm -qi kubevirt-virtctl Name : kubevirt-virtctl Version : 0.26.1 Release : 15.el8 Architecture: x86_64 Install Date: Tue 04 Aug 2020 04:20:43 PM EDT Group : Unspecified Size : 41798296 License : ASL 2.0 Signature : RSA/SHA256, Thu 20 Feb 2020 12:43:47 PM EST, Key ID 199e2f91fd431d51 Source RPM : kubevirt-0.26.1-15.el8.src.rpm Build Date : Wed 19 Feb 2020 11:18:07 AM EST Build Host : x86-vm-08.build.eng.bos.redhat.com Relocations : (not relocatable) Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> Vendor : Red Hat, Inc. URL : https://github.com/kubevirt/kubevirt Summary : kubevirt - virtctl Description : CNV kubevirt virtctl The documentation appears to use virtctl directly rather than through a plugin: https://docs.openshift.com/container-platform/4.5/virt/virt-using-the-cli-tools.html#virt-using-the-cli-tools
$ which oc-virt /usr/bin/oc-virt $ oc-virt Available Commands: console Connect to a console of a virtual machine instance. expose Expose a virtual machine instance, virtual machine, or virtual machine instance replica set as a new service. fslist Return full list of filesystems available on the guest machine. guestosinfo Return guest agent info about operating system. help Help about any command image-upload Upload a VM image to a DataVolume/PersistentVolumeClaim. migrate Migrate a virtual machine. pause Pause a virtual machine rename Rename a stopped virtual machine. restart Restart a virtual machine. start Start a virtual machine. stop Stop a virtual machine. unpause Unpause a virtual machine userlist Return full list of logged in users on the guest machine. version Print the client and server version information. vnc Open a vnc connection to a virtual machine instance. Use "virtctl <command> --help" for more information about a given command. Use "virtctl options" for a list of global command-line options (applies to all commands).
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 (Moderate: OpenShift Virtualization 2.6.0 security and bug fix update), 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/RHSA-2021:0799