Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-2357

TaskRun pod get evicted during a Graceful Termination event, such as a node drain

XMLWordPrintable

    • False
    • None
    • False

      A TaskRun should not be evicted during a node drain until the status of the TaskRun is either `Completed` or `Failed`.

      Evicting a TaskRun in the middle of its execution can lead to unforeseen and harmful situations.

       

      How to reproduce:

      // create the TaskRun
      $ cat << EOF | oc create -f -
      apiVersion: tekton.dev/v1beta1
      kind: TaskRun
      metadata:
        name: sleeping-reproducer
      spec:
        taskSpec:
          steps:
          - name: sleep
            image: registry.access.redhat.com/ubi8/ubi
            script: |
              echo "sleeping 300s ..." && sleep 300
      EOF
      
      // drain the node where the TaskRun is running
      $ oc adm drain $(oc get po -l tekton.dev/taskRun=sleeping-reproducer -o jsonpath='{.items[0].spec.nodeName}') --delete-emptydir-data --ignore-daemonsets
      

      Doing so will cause the eviction of the Pod/TaskRun sleeping-reproducer.

       

            Unassigned Unassigned
            rhn-support-gmeghnag Gabriel Meghnagi
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: