Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-6496 Improve CI checks
  3. HDDS-7646

No logs if pod stuck in PodInitializing

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • test

    Description

      Kubernetes check fails to get pod logs if cluster cannot start.

      Defaulted container "scm" out of: scm, init (init)
      Error from server (BadRequest): container "scm" in pod "scm-0" is waiting to start: PodInitializing
      
      get_logs() {
        mkdir -p logs
        for pod in $(kubectl get pods -o custom-columns=NAME:.metadata.name | tail -n +2); do
          for initContainer in $(kubectl get pod -o jsonpath='{.spec.initContainers[*].name}' "${pod}"); do
            kubectl logs "${pod}" "${initContainer}" > logs/"pod-${pod}-${initContainer}.log"
          done
          kubectl logs "${pod}" > logs/"pod-${pod}.log"
        done
      }
      

      Attachments

        Activity

          People

            sgal Szabolcs Gál
            adoroszlai Attila Doroszlai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: