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

There are logs overflow when create jobset with RestartJobSetAndIgnoreMaxRestarts

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Normal Normal
    • None
    • 4.20.0
    • JobSet
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Yes
    • None
    • None
    • Rejected
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      There are logs overflow when create jobset with RestartJobSetAndIgnoreMaxRestarts 

      Version-Release number of selected component (if applicable):

      4.20 

      How reproducible:

          Always

      Steps to Reproduce:

      1) Deploy jobset operator ;
      2) create jobset like :  apiVersion: jobset.x-k8s.io/v1alpha2
      kind: JobSet
      metadata:
        name: onjobfailurereasons-present-example
      spec:
        failurePolicy:
          maxRestarts: 3
          rules:
            # The JobSet will restart an unlimited number of times when the
            # leader job fails with the failure reason BackoffLimitExceeded.
            - action: RestartJobSetAndIgnoreMaxRestarts 
              targetReplicatedJobs:
              - leader
              onJobFailureReasons:
              - BackoffLimitExceeded
        replicatedJobs:
        - name: leader
          replicas: 1
          template:
            spec:
              # Set backoff limit to 0 so job will immediately fail if any pod fails.
              backoffLimit: 0
              completions: 2
              parallelism: 2
              template:
                spec:
                  containers:
                  - name: leader
                    image: quay.io/openshifttest/hello-openshift:1.2.0
                    command:
                    - bash
                    - -xc
                    - |
                      echo "JOB_COMPLETION_INDEX=$JOB_COMPLETION_INDEX"
                      if [[ "$JOB_COMPLETION_INDEX" == "0" ]]; then
                        for i in $(seq 10 -1 1)
                        do
                          echo "Sleeping in $i"
                          sleep 1
                        done
                        exit 1
                      fi
                      for i in $(seq 1 100)
                      do
                        echo "$i"
                        sleep 1
                      done
        - name: workers
          replicas: 1
          template:
            spec:
              backoffLimit: 0
              completions: 2
              parallelism: 2
              template:
                spec:
                  containers:
                  - name: worker
                    image: quay.io/openshifttest/hello-openshift:1.2.0
                    command:
                    - bash
                    - -xc
                    - |
                      sleep 100

      Actual results:

       2) There are logs overflow from the jobset-controller-manager pod
      
      2025-09-09T10:18:12Z    INFO    unknown field "spec.replicatedJobs[0].template.metadata.creationTimestamp"    {"controller": "jobset", "controllerGroup": "jobset.x-k8s.io", "controllerKind": "JobSet", "JobSet": {"name":"onjobfailurereasons-podfailurepolicy-example","namespace":"testzy"}, "namespace": "testzy", "name": "onjobfailurereasons-podfailurepolicy-example", "reconcileID": "2cc2d317-650c-4d1b-b76a-20ac10cd787f"}
      2025-09-09T10:18:12Z    INFO    unknown field "spec.replicatedJobs[0].template.spec.template.metadata.creationTimestamp"    {"controller": "jobset", "controllerGroup": "jobset.x-k8s.io", "controllerKind": "JobSet", "JobSet": {"name":"onjobfailurereasons-podfailurepolicy-example","namespace":"testzy"}, "namespace": "testzy", "name": "onjobfailurereasons-podfailurepolicy-example", "reconcileID": "2cc2d317-650c-4d1b-b76a-20ac10cd787f"}
      2025-09-09T10:18:12Z    INFO    unknown field "spec.replicatedJobs[1].template.metadata.creationTimestamp"    {"controller": "jobset", "controllerGroup": "jobset.x-k8s.io", "controllerKind": "JobSet", "JobSet": {"name":"onjobfailurereasons-podfailurepolicy-example","namespace":"testzy"}, "namespace": "testzy", "name": "onjobfailurereasons-podfailurepolicy-example", "reconcileID": "2cc2d317-650c-4d1b-b76a-20ac10cd787f"}
      2025-09-09T10:18:12Z    INFO    unknown field "spec.replicatedJobs[1].template.spec.template.metadata.creationTimestamp"    {"controller": "jobset", "controllerGroup": "jobset.x-k8s.io", "controllerKind": "JobSet", "JobSet": {"name":"onjobfailurereasons-podfailurepolicy-example","namespace":"testzy"}, "namespace": "testzy", "name": "onjobfailurereasons-podfailurepolicy-example", "reconcileID": "2cc2d317-650c-4d1b-b76a-20ac10cd787f"}

      Expected results:

      no such logs 

      Additional info:

          

              Unassigned Unassigned
              yinzhou@redhat.com Ying Zhou
              None
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: