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

Control plane pods missing tolerations specified in hypershift create cluster azure --tolerations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.18.0
    • HyperShift
    • Important
    • None
    • Hypershift Sprint 262, Hypershift Sprint 263
    • 2
    • Proposed
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      Some control plane pods are not receiving the tolerations specified using the hypershift create cluster azure --toleration command.

      Steps to Reproduce:

      1. Create Azure HC with hypershift create cluster azure --toleration key=foo-bar.baz/quux,operator=Exists --toleration=key=fred,operator=Equal,value=foo,effect=NoSchedule --toleration key=waldo,operator=Equal,value=bar,effect=NoExecute,tolerationSeconds=3600 ... 
      
      2. Run the following script against the MC
      
      NAMESPACE="clusters-XXX"
      PODS="$(oc get pods -n "$NAMESPACE" -o jsonpath='{.items[*].metadata.name}')"
      
      for POD in $PODS; do
        echo "Checking pod: $POD"  
        tolerations="$(oc get po -n $NAMESPACE $POD -o jsonpath='{.spec.tolerations}' | jq -c --sort-keys)"
        failed="false"
        
        if ! grep -q '"key":"foo-bar.baz/quux","operator":"Exists"' <<< "$tolerations"; then
          echo "No foo-bar.baz/quux key found" >&2
          failed="true"
        fi
        
        if ! grep -q '"effect":"NoSchedule","key":"fred","operator":"Equal","value":"foo"' <<< "$tolerations"; then
          echo "No fred key found" >&2
          failed="true"
        fi
        
        if ! grep -q '"effect":"NoExecute","key":"waldo","operator":"Equal","tolerationSeconds":3600,"value":"bar"' <<< "$tolerations"; then
          echo "No waldo key found" >&2
          failed="true"
        fi
        
        if [[ $failed == "true" ]]; then
          echo "Tolerations: "
          echo "$tolerations" | jq --sort-keys
        fi
        echo 
      done 
      3. Take note of the results 
      

      Actual results (and dump files):

      https://drive.google.com/drive/folders/1MQYihLSaK_9WDq3b-H7vx-LheSX69d2O?usp=sharing

      Expected results:

      All specified tolerations are propagated to all control plane pods. 
      

              sjenning Seth Jennings
              fxierh Feilian Xie
              He Liu He Liu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: