-
Bug
-
Resolution: Unresolved
-
Undefined
-
4.13, 4.12, 4.14, 4.15, 4.16, 4.17, 4.18, 4.19, 4.20
Description of problem:
Currently when the in-cluster must-gather fails, oc adm must-gather falls back to inspecting ClusterOperators. This can make it hard to use the fallback inspect results to debug cluster issues like "why is my ClusterVersion update slow?".
Version-Release number of selected component
No oc adm must-gather has ever included ClusterVersion or the openshift-cluster-version namespace explicitly in the fallback inspection, so all existing releases are exposed.
How reproducible
Every time.
Steps to Reproduce
1. Run oc adm must-gather as a read-only user.
2. Watch it fail to create a temporary namespace.
3. Watch it fall back to inspecting resources.
4. See if the fallback inspection includes ClusterVersion YAML and CVO logs.
Actual results
ClusterVersion YAML is currently collected, because ClusterOperator collection triggers gatherConfigResourceData and gatherConfigResourceData collects all the config.openshift.io resources, but CVO logs and other general namespace resources are not. For example, me on build02:
$ oc adm must-gather ... Error running must-gather collection: creating temp namespace: namespaces is forbidden: User "wking" cannot create resource "namespaces" in API group "" at the cluster scope Falling back to `oc adm inspect clusteroperators.v1.config.openshift.io` to collect basic cluster information. ... $ head must-gather.local.5581429322482403645/inspect.local.4059263048975163967/cluster-scoped-resources/config.openshift.io/clusterversions.yaml --- apiVersion: config.openshift.io/v1 items: - apiVersion: config.openshift.io/v1 kind: ClusterVersion metadata: creationTimestamp: "2020-04-16T19:10:55Z" generation: 159 name: version resourceVersion: "5636110020" $ tree must-gather.local.5581429322482403645/inspect.local.4059263048975163967/namespaces/openshift-cluster-version must-gather.local.5581429322482403645/inspect.local.4059263048975163967/namespaces/openshift-cluster-version └── monitoring.coreos.com ├── prometheusrules │ └── cluster-version-operator.yaml └── servicemonitors └── cluster-version-operator.yaml 4 directories, 2 files
Expected results
Includes ClusterVersion YAML and CVO logs.