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

disableAffinityAssistant field not respected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.18
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Important
    • None
    • All
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

          I have an OpenShift Pipeline that builds container images on x86 and s390x. After updating to Pipelines operator version 1.19, when I run the pipeline, an affinity assistant pod is created despite my tektonconfig having "disableAffinityAssistant" to true. 

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

          OpenShift Pipelines Operator Version 1.19
          OpenShift Version 4.18.4

      How reproducible:

      Reproduced in multiple namespaces and on multiple clusters    

      Steps to Reproduce:

          1. Install multi-arch cluster with OpenShift Pipelines, ensure "disableAffinityAssistant" field is set to "true" in the tektonconfig config object
          2. Create pipeline that builds images on x86 and s390x
          3. Run the pipeline specifying the build pods must run on their respective architectures.
          4. 
          

      Actual results:

          Notice that an affinity-assistant pod is created and that only the build pod on the same architecture as the affinity-assistant pod is run. All other architecture pods are left in pending.
      
      $ oc get pods -n petstore
      NAME                                                   READY   STATUS      RESTARTS   AGE
      affinity-assistant-e96f667797-0                        1/1     Running     0          33m
      el-petstore-build-event-listener-7c9b9fcd56-nw7t8      1/1     Running     0          19h
      multiarch-petstore-build-rs14s6-fetch-repository-pod   0/1     Completed   0          33m
      multiarch-petstore-build-rs14s6-s390x-build-pod        0/1     Completed   0          33m
      multiarch-petstore-build-rs14s6-x86-build-pod          0/1     Pending     0          33m
      $ oc get tektonconfig config -n openshift-pipelines -o yaml | grep -i affinity
          disable-affinity-assistant: true  
      $ oc get pod -n petstore multiarch-petstore-build-rs14s6-x86-build-pod -o json | jq '.status.conditions[0].message'
      "0/11 nodes are available: 3 node(s) had untolerated taint {node-role.kubernetes.io/master: }, 4 node(s) didn't match Pod's node affinity/selector, 4 node(s) didn't match pod affinity rules. preemption: 0/11 nodes are available: 11 Preemption is not helpful for scheduling."
      $ oc get pod -n petstore multiarch-petstore-build-rs14s6-x86-build-pod -o json | jq '.spec.affinity'
      {
        "podAffinity": {
          "requiredDuringSchedulingIgnoredDuringExecution": [
            {
              "labelSelector": {
                "matchLabels": {
                  "app.kubernetes.io/component": "affinity-assistant",
                  "app.kubernetes.io/instance": "affinity-assistant-e96f667797"
                }
              },
              "topologyKey": "kubernetes.io/hostname"
            }
          ]
        }
      }

      Expected results:

          Affinity assistant pod is not created and pods within a pipeline can be scheduled across multiple architectures

      Additional info:

          If this should be opened against a repository in the OpenShift Pipelines GitHub, please feel free to point me in the right direction

              dsoni@redhat.com Dhruv Soni
              joshuabeha Joshua Beha
              None
              None
              None
              None
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: