Bug 1698687
| Summary: | Must-gather tool gathers wrong objects from image registry | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | wewang <wewang> |
| Component: | oc | Assignee: | Maciej Szulik <maszulik> |
| Status: | CLOSED ERRATA | QA Contact: | wewang <wewang> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 4.1.0 | CC: | aos-bugs, jokerman, maszulik, mfojtik, mmccomas, obulatov, wzheng |
| Target Milestone: | --- | ||
| Target Release: | 4.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
must-gather was not using full resource name, including api group.
Consequence:
Some resources have similar names, but reside in different group. Failing to specify group lead to picking wrong resource.
Fix:
Always specify full resource (group + resource name) when reading objects.
Result:
Gathering data works correctly.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-06-04 10:47:22 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: | |||
Now no error info, but I found duplicated info, @Maciej Szulik @Oleg Bulatov do you think if it's acceptable? [wewang@Desktop must-gather]$ ./openshift-must-gather inspect clusteroperator/image-registry 2019/04/22 14:55:38 Gathering config.openshift.io resource data... 2019/04/22 14:55:39 Gathering kubeapiserver.operator.openshift.io resource data... 2019/04/22 14:55:39 Gathering cluster operator resource data... 2019/04/22 14:55:39 Gathering related object reference information for ClusterOperator "image-registry"... 2019/04/22 14:55:39 Found related object "system:registry" for ClusterOperator "image-registry"... 2019/04/22 14:55:39 Found related object "registry-registry-role" for ClusterOperator "image-registry"... 2019/04/22 14:55:39 Found related object "registry" for ClusterOperator "image-registry"... 2019/04/22 14:55:39 Found related object "image-registry-certificates" for ClusterOperator "image-registry"... 2019/04/22 14:55:39 Found related object "image-registry-private-configuration" for ClusterOperator "image-registry"... 2019/04/22 14:55:39 Found related object "cluster" for ClusterOperator "image-registry"... 2019/04/22 14:55:39 Found related object "node-ca" for ClusterOperator "image-registry"... 2019/04/22 14:55:39 Found related object "image-registry" for ClusterOperator "image-registry"... ## the same info with below line 2019/04/22 14:55:39 Found related object "image-registry" for ClusterOperator "image-registry"... ## 2019/04/22 14:55:53 Finished successfully with no errors. This is not a duplication, if you look into oc get clusteroperator/image-registry -o yaml output
you'll notice there are 2 image-registry resources:
- group: ""
name: image-registry
namespace: openshift-image-registry
resource: services
- group: apps
name: image-registry
namespace: openshift-image-registry
resource: deployments
it just happens that both are named the same. I've crafted https://github.com/openshift/must-gather/pull/77
which will make the output more explicit, but that's not a bug per se.
Ok, Thank you, verify it now. 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 |
Description of problem: must-gather tool collect logs: "images.image.openshift.io "cluster" not found" from image-registry, it's not correct. we just defined one cluster called images.config.openshift.io/cluster Version-Release number of selected component (if applicable): clusterverson: 4.0.0-0.ci-2019-04-10-002527 payload: registry.svc.ci.openshift.org/ocp/release@sha256:9a8a2f66c5d4b63bedc6ff3a0b5d692ff5dc310254d098cc29bda1527a255689 How reproducible: always Steps to Reproduce: [wewang@Desktop must-gather]$ ./openshift-must-gather inspect clusteroperator/image-registry 2019/04/10 17:42:10 Gathering config.openshift.io resource data... 2019/04/10 17:42:16 Gathering kubeapiserver.operator.openshift.io resource data... 2019/04/10 17:42:16 Gathering cluster operator resource data... 2019/04/10 17:42:16 Gathering related object reference information for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "system:registry" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "registry-registry-role" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "registry" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "image-registry-certificates" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "image-registry-private-configuration" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "cluster" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "node-ca" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "image-registry" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "image-registry" for ClusterOperator "image-registry"... 2019/04/10 17:42:16 Found related object "myroute" for ClusterOperator "image-registry"... Error: images.image.openshift.io "cluster" not found Actual results: Should not have about Error: images.image.openshift.io "cluster" not found Expected results: Should not have the error Additional info: FYI, logs already have cluster info: 2019/04/10 17:42:16 Found related object "cluster" for ClusterOperator "image-registry"...