Uploaded image for project: 'ONAP Operations Manager'
  1. ONAP Operations Manager
  2. OOM-1947

Readiness container fails if any pod has node affinity rules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: High High
    • El Alto Release
    • Dublin Release, El Alto Release
    • None
    • OOM-El Alto Sprint 2

      If a pod is added to the onap namespace that has a node affinity rule like the rule below then the readiness containers will fail with the error 

      2019-06-26 15:41:10,020 - INFO - Checking if message-router-kafka is ready
      2019-06-26 15:41:10,774 - ERROR - Exception when calling list_namespaced_pod: Invalid value for `match_expressions`, must not be `None`

      ...

      "spec": {"spec": { "affinity": {          "nodeAffinity": {            "requiredDuringSchedulingIgnoredDuringExecution": {              "nodeSelectorTerms": [                {                  "matchFields": [                   

      {                      "key": "metadata.name",                      "operator": "In",                      "values": [                        "node1"                      ]                    }

                        ]                }              ]            }          }        },        "containers": [

      ...

       

      This can be recreated using the attached file and the command 

      kubectl -n onap create -f recreatereadinessbug.json

      then delete a pod

      kubectl -n onap delete po dev-dmaap-message-router-0

      then check error

      kubectl -n onap logs -f dev-dmaap-message-router-0 message-router-readiness

       

      doing 

      kubectl -n onap delete -f recreatereadinessbug.json

      will remove the problem

       

       

       

       

            akanshad akanshad
            afenner afenner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: