Description of problem: In the past when doing "oc get p<tab>" the tab would bring from server resource that are starting with "p", or "oc get pods <tab>" would bring all the pods in the namespace. The functionality is still working with "oc delete/patch/project/describe/edit" and all the other sub-commands. Only for "oc get" the tab output is local files instead of server resource. Version-Release number of selected component (if applicable): 4.11.0-0.nightly-2022-07-24-151159 How reproducible: 100% Steps to Reproduce: 1. source <(oc completion bash) 2. Do "oc get <tab>" or "oc get pods <tab>" 3. Check output. Actual results: Local files are shown instead of server resource when using get commands. [srozen@srozen-lap 4.11]$ oc get pods ~/ lvm-bundle.yaml operator_sub.yaml sub.yaml bigger.log lvm-cluster-thin.yaml pod-block.yaml test-auto/ BZ/ lvm-cluster.yaml pod-mixed.yaml test-me/ Expected results: The tab should show server resource instead of local files like oc delete and all the others sub command other than get that work. [srozen@srozen-lap 4.11]$ oc delete s schedulers.config.openshift.io servicemonitors.monitoring.coreos.com storagestates.migration.k8s.io secrets services storageversionmigrations.migration.k8s.io securitycontextconstraints.security.openshift.io statefulsets.apps subscriptions.operators.coreos.com serviceaccounts storageclasses.storage.k8s.io servicecas.operator.openshift.io storages.operator.openshift.io [srozen@srozen-lap 4.11]$ oc delete pods lvm-operator-controller-manager-7cbc49fc6d-4j2zw topolvm-node-lbjg2 topolvm-controller-58bbf455f5-4tfmf vg-manager-tpqr4 Additional info:
Hello Shay, checking with 4.12.0-0.nightly-2022-07-07-144231 on Fedora 32 with bash-5.0.17-1.fc32.x86_64 I am not able to reproduce the issue. When doing "oc get <tab>", "oc get pods <tab>" I get the resources, resp. pods. ``` $ oc get <tab> Display all 188 possibilities? (y or n) $ oc get pod<tab> poddisruptionbudgets.policy pods podtemplates podmonitors.monitoring.coreos.com podsecuritypolicies.policy podnetworkconnectivitychecks.controlplane.operator.openshift.io pods.metrics.k8s.io ``` When doing "$ oc get pods <tab>" the command changes into "$ oc get pods sso". For namespaces: ``` $ oc get ns <tab> default openshift-cluster-storage-operator openshift-ingress openshift-multus kube-node-lease openshift-cluster-version openshift-ingress-canary openshift-network-diagnostics ... ``` When building and running oc from the latest release-4.11 head I am still not able to reproduce it. What operating system/bash version are you using?
Hi Jan, the problem occurred while using 4.11.0-0.nightly-2022-07-24-151159 and still happens with the newer 4.11 nightly. Maybe it got fixed in 4.12 somehow but still happens in 4.11 which the BZ was raised on.
*** This bug has been marked as a duplicate of bug 2101885 ***
I'm reopening. https://bugzilla.redhat.com/show_bug.cgi?id=2101885 is about 4.12. This is around 4.11.
I set duplicate id of 4.12. This is 4.11 https://bugzilla.redhat.com/show_bug.cgi?id=2107003 and this https://github.com/openshift/oc/pull/1206 is the patch waiting to be approved.
*** This bug has been marked as a duplicate of bug 2107003 ***