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

Prefer local dns does not work expectedly on OCPv4.9


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 4.9
    • Networking / DNS
    • None
    • Moderate
    • None
    • False
    • Hide



      Description of problem:

      When queried dns hostname from certain pod on the certain node, responded from random coredns pod, not prefer local one. Is it expected result ?
      # In OCP v4.8.13 case
      // Ran dig command on the certain node which is running the following test-7cc4488d48-tqc4m pod.
      sh-4.4# while : ; do echo -n "$(date '+%H:%M:%S') :"; dig google.com +short; sleep 1; done
      07:16:33 :
      07:16:34 : <--- Refreshed the upstream result
      07:16:36 :
      07:16:37 :
      // The dig results is matched with the running node one as you can see the above one.
      $ oc rsh  test-7cc4488d48-tqc4m bash -c 'while : ; do echo -n "$(date '+%H:%M:%S') :"; dig google.com +short; sleep 1; done'
      07:16:35 : 
      07:16:36 : <--- At the same time, the pod dig result is also refreshed.
      07:16:37 :
      07:16:38 :
      But in v4.10 case, in contrast, the dns query result is various and responded randomly regardless local dns results on the node as follows.
      # In OCP v4.10.23 case, pod's response from DNS services are not consistent.
      $ oc rsh test-848fcf8ddb-zrcbx  bash -c 'while : ; do echo -n "$(date '+%H:%M:%S') :"; dig google.com +short; sleep 1; done'
      07:23:00 :
      07:23:01 :
      07:23:02 :
      07:23:03 :
      07:23:04 :
      07:23:05 :
      # Even though the node which is running the pod keep responding the same IP...
      sh-4.4# while : ; do echo -n "$(date '+%H:%M:%S') :"; dig google.com +short; sleep 1; done
      07:23:00 :
      07:23:01 :
      07:23:02 :
      07:23:03 :
      07:23:04 :
      07:23:05 :

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

      v4.10.23 (ROSA)
      SDN: OpenShiftSDN

      How reproducible:

      You can always reproduce this issue using "dig google.com" from both any pod and the node the pod running according to the above "Description" details.

      Steps to Reproduce:

      1. Run any usual pod, and check which node the pod is running on.
      2. Run dig google.com on the pod and the node.
      3. Check the IP is consistent with the running node each other. 

      Actual results:

      The response IPs are not consistent and random IP is responded.

      Expected results:

      The response IP is kind of consistent, and aware of prefer local dns.

      Additional info:

      This issue affects EgressNetworkPolicy dnsName feature.

            mkennell@redhat.com Martin Kennelly
            rhn-support-dapark Daein Park
            Melvin Joseph Melvin Joseph
            0 Vote for this issue
            5 Start watching this issue