Bug 1942935

Summary: must-gather improvements
Product: OpenShift Container Platform Reporter: Jan Chaloupka <jchaloup>
Component: ocAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: high    
Version: 4.8CC: aos-bugs, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1942938 (view as bug list) Environment:
Last Closed: 2021-07-27 22:55:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1942938    

Description Jan Chaloupka 2021-03-25 11:03:01 UTC
- stop trying to gather metrics and other endpoints directly from pods
  https://github.com/openshift/oc/pull/763
- prevent inspect from panic-ing if pods are missing
  https://github.com/openshift/oc/pull/762
- indicate how many bytes the hidden secret key was
  https://github.com/openshift/oc/pull/752
- inspect clusteroperators as a backup to must-gather if it fails
  https://github.com/openshift/oc/pull/749
- Add summary to oc must-gather
  https://github.com/openshift/oc/pull/738

Comment 2 Maciej Szulik 2021-03-25 13:40:39 UTC
These improvements are significantly helping debugging clusters so I'm bumping priority for those to high.

Comment 3 zhou ying 2021-03-30 02:59:38 UTC
When run the latest oc could see the following info:
[root@localhost roottest]# oc adm must-gather 
[must-gather      ] OUT Using must-gather plug-in image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:44f6d925f64fb132a2bcb33f80c7b2376cd07b04d47c9fb12e15a3ee9ff6a774
When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information.
ClusterID: df7511a0-2dd7-442d-ab9c-89d46b704486
ClusterVersion: Stable at "4.8.0-0.nightly-2021-03-26-054333"
ClusterOperators:
	All healthy and stable
...

So verified the https://github.com/openshift/oc/pull/738

Comment 4 zhou ying 2021-03-30 03:20:04 UTC
From the output of the must-gather , could not find the metire and health, so verified the  https://github.com/openshift/oc/pull/763

├── pods
│   ├── etcd-ip-10-0-59-119.us-east-2.compute.internal
│   │   ├── etcd
│   │   │   └── etcd
│   │   │       └── logs
│   │   │           ├── current.log
│   │   │           ├── previous.insecure.log
│   │   │           └── previous.log
│   │   ├── etcdctl
│   │   │   └── etcdctl
│   │   │       └── logs
│   │   │           ├── current.log
│   │   │           ├── previous.insecure.log
│   │   │           └── previous.log
│   │   ├── etcd-ensure-env-vars
│   │   │   └── etcd-ensure-env-vars
│   │   │       └── logs
│   │   │           ├── current.log
│   │   │           ├── previous.insecure.log
│   │   │           └── previous.log

Comment 5 zhou ying 2021-03-30 09:35:54 UTC
When I try to verify the https://github.com/openshift/oc/pull/762/files, I could see the origin data , please see : 

[root@localhost inspect.local.2941068679481782428]# cat namespaces/openshift-kni-infra/core/secrets/builder-dockercfg-9qq2t.yaml
---
apiVersion: v1
data:
  .dockercfg: Njk5OSBieXRlcyBsb25n

Comment 6 zhou ying 2021-03-30 12:07:12 UTC
Checked the pr as :

[root@localhost secrets]# oc get secrets  my-secret -o yaml 
apiVersion: v1
data:
  key1: c3VwZXJzZWNyZXQ=
  key2: dG9wc2VjcmV0


[root@localhost secrets]# more my-secret.yaml 
---
apiVersion: v1
data:
  key1: MTEgYnl0ZXMgbG9uZw==
  key2: OSBieXRlcyBsb25n

So could verify the pr : https://github.com/openshift/oc/pull/762

Comment 7 zhou ying 2021-03-30 12:07:42 UTC
Checked the pr as :

[root@localhost secrets]# oc get secrets  my-secret -o yaml 
apiVersion: v1
data:
  key1: c3VwZXJzZWNyZXQ=
  key2: dG9wc2VjcmV0


[root@localhost secrets]# more my-secret.yaml 
---
apiVersion: v1
data:
  key1: MTEgYnl0ZXMgbG9uZw==
  key2: OSBieXRlcyBsb25n

So could verify the pr : https://github.com/openshift/oc/pull/762

Comment 8 zhou ying 2021-03-31 01:56:25 UTC
[root@localhost ~]# oc adm  must-gather --image='quay.io/openshift-release-dev/ocp-v4.0-art-dev:nonexist'
[must-gather      ] OUT Using must-gather plug-in image: quay.io/openshift-release-dev/ocp-v4.0-art-dev:nonexist
When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information.
ClusterID: df7511a0-2dd7-442d-ab9c-89d46b704486
ClusterVersion: Stable at "4.8.0-0.nightly-2021-03-26-054333"
ClusterOperators:
	All healthy and stable


[must-gather      ] OUT namespace/openshift-must-gather-h75nh created
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-b7wb5 created
[must-gather      ] OUT pod for plug-in image quay.io/openshift-release-dev/ocp-v4.0-art-dev:nonexist created
[must-gather-4z5hj] OUT gather did not start: unable to pull image: ImagePullBackOff: Back-off pulling image "quay.io/openshift-release-dev/ocp-v4.0-art-dev:nonexist"
[must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-b7wb5 deleted
[must-gather      ] OUT namespace/openshift-must-gather-h75nh deleted


When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information.
ClusterID: df7511a0-2dd7-442d-ab9c-89d46b704486
ClusterVersion: Stable at "4.8.0-0.nightly-2021-03-26-054333"
ClusterOperators:
	All healthy and stable


Gathering data for ns/openshift-config...
。。。。。
Wrote inspect data to must-gather.local.6207398438967126412.

So could verify the pr:  https://github.com/openshift/oc/pull/749

Comment 9 Jan Chaloupka 2021-04-09 11:48:16 UTC
*** Bug 1942934 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2021-07-27 22:55:38 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 (Moderate: OpenShift Container Platform 4.8.2 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-2021:2438