Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-56598

must-gather inspect fallback should include the openshift-cluster-version namespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • 4.20.0
    • 4.13, 4.12, 4.14, 4.15, 4.16, 4.17, 4.18, 4.19, 4.20
    • oc
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • In Progress
    • Release Note Not Required
    • None
    • None
    • None
    • None
    • None

      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.

              trking W. Trevor King
              trking W. Trevor King
              None
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: