Hide Forgot
Description of problem: The "oc get" command has an "--ignore-not-found" option. Based on its description one would expect that all existing objects with the given names would be listed while no error would be produced for non-existent objects. What happens instead is that only objects until the first non-existent object are listed. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. On OCP 3.9 cluster create few PV's for ex: ruby, gluster. 2. Try to list PV's $ oc get pv -o name --ignore-not-found ruby gluster persistentvolume/ruby persistentvolume/gluster This will show these PV's as both are present on cluster. 3. Now try same command by adding name of PV's which no more exist on cluster. For ex: $ oc get pv -o name --ignore-not-found ruby nfs gluster ignoreme persistentvolume/ruby In this case nfs and ignoreme PV's are not present on cluster. Actual results: Only objects until the first non-existent object are listed. Expected results: Should list all existent objects. Additional info: Issue is specific to option --ignore-not-found. Same behaviour observed with pods. i.e oc get pods -o name --ignore-not-found <pod-names>
Origin PR: https://github.com/openshift/origin/pull/21369
Kubernetes PR: https://github.com/kubernetes/kubernetes/pull/70311
Origin and Upstream PRs have merged. Moving to MODIFIED. This fix will be released as part of 4.0
Verified in v4.0.0-0.80.0 [root@ip-172-18-0-211 ~]# oc get pv my-pv non-exist-1 non-exist-2 regpv-volume --ignore-not-found NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE my-pv 10G RWX Retain Bound xxia-proj/my-claim-2 58m NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE regpv-volume 17G RWX Retain Bound default/regpv-claim 5h
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-2019:0758