Uploaded image for project: 'OpenShift Workloads'
  1. OpenShift Workloads
  2. WRKLDS-1190

oc adm must-gather: print significant log lines with a timestamp


    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • 3
    • False
    • None
    • False
    • Workloads Sprint 252

      Pulling from https://issues.redhat.com/browse/WRKLDS-259. Currently, `oc adm must-gather` prints logs that are not timestamped when fallback is triggered (running `oc adm inspect` directly). E.g.:

      $ ./oc adm must-gather
      [must-gather      ] OUT Using must-gather plug-in image: registry.ci.openshift.org/ocp/4.16-2024-04-19-040249@sha256:addc9b013a4cbbe1067d652d032048e7b5f0c867174671d51cbf55f765ff35fc
      When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information:
      ClusterID: 1fa407e3-2ea7-4c34-8fba-8c4d5c3a0bda
      ClientVersion: v4.2.0-alpha.0-2261-g17c015a
      ClusterVersion: Stable at "4.16.0-0.ci-2024-04-19-040249"
      	All healthy and stable
      [must-gather      ] OUT namespace/openshift-must-gather-9qrqc created
      [must-gather      ] OUT clusterrolebinding.rbac.authorization.k8s.io/must-gather-8c5gz ...
      Gathering data for ns/openshift-config...
      Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
      Gathering data for ns/openshift-config-managed...
      Gathering data for ns/openshift-authentication...
      Gathering data for ns/openshift-authentication-operator...
      Gathering data for ns/openshift-ingress...
      Gathering data for ns/openshift-oauth-apiserver...
      Gathering data for ns/openshift-machine-api...
      Gathering data for ns/openshift-cloud-controller-manager-operator...
      Gathering data for ns/openshift-cloud-controller-manager...

      The missing timestamps disallow to measure how much time it takes for each "Gathering data" step to complete. The completion time can help to identify which steps take the most of the collection time.

      *Testing part*: the only testing case here is to validate every "significant" log line has a timestamp. Significant = "Gathering data" line. In both cases. the normal one when a must-gather-??? pod/container is running. And when a must-gather image is not pulled (e.g. does not exist) and the must-gather falls back to running `oc adm inspect` code directly (takes significantly longer to run).

      *Documenting part*: no-doc

            jchaloup@redhat.com Jan Chaloupka
            jchaloup@redhat.com Jan Chaloupka
            0 Vote for this issue
            1 Start watching this issue