Bug 2086459 - oc adm inspect fails when one of resources not exist
Summary: oc adm inspect fails when one of resources not exist
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.10
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.11.0
Assignee: Arda Guclu
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-16 08:20 UTC by Arda Guclu
Modified: 2022-08-10 11:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:12:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 1137 0 None open Bug 2086459: Continue inspection when some resources are not found 2022-05-16 08:21:22 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:12:11 UTC

Description Arda Guclu 2022-05-16 08:20:00 UTC
Description of problem:
oc adm inspect ns/exist ns/nonexist 

command fails without collection any data from the existed resources by throwing resource not found error.

How reproducible:
Run oc adm release inspect with not existed resources

Actual results:
It fails without inspecting existed resources

Expected results:
It should continue inspection and can return a warning message about not existed resources.

Comment 3 zhou ying 2022-05-23 01:53:40 UTC
the issue has fixed :

 oc adm inspect clusteroperator/openshift-apiserver  clusteroperator/kube-apiservernoexit
Gathering data for ns/openshift-config...
Gathering data for ns/openshift-config-managed...
Gathering data for ns/openshift-apiserver-operator...
Gathering data for ns/openshift-apiserver...
Gathering data for ns/openshift-etcd-operator...
Wrote inspect data to inspect.local.5693469870155877677.
error: errors occurred while gathering data:
    [clusteroperators.config.openshift.io "kube-apiservernoexit" not found, skipping gathering namespaces/openshift-config due to error: the server doesn't have a resource type "egressfirewalls", skipping gathering namespaces/openshift-config-managed due to error: the server doesn't have a resource type "egressfirewalls", skipping gathering namespaces/openshift-apiserver-operator due to error: the server doesn't have a resource type "egressfirewalls", skipping gathering namespaces/openshift-apiserver due to error: the server doesn't have a resource type "egressfirewalls", skipping gathering namespaces/openshift-etcd-operator due to error: the server doesn't have a resource type "egressfirewalls", skipping gathering endpoints/host-etcd-2 due to error: endpoints "host-etcd-2" not found]
[root@localhost ~]# echo $?
1

oc version --client
Client Version: 4.11.0-202205170307.p0.g2e3d4ac.assembly.stream-2e3d4ac
Kustomize Version: v4.5.4

Comment 5 errata-xmlrpc 2022-08-10 11:12:00 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security 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-2022:5069


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