Bug 1851267

Summary: OpenStack: Set coredns forward policy to sequential
Product: OpenShift Container Platform Reporter: Brendan Shirren <bshirren>
Component: InstallerAssignee: Martin André <m.andre>
Installer sub component: OpenShift on OpenStack QA Contact: David Sanz <dsanzmor>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: eduen, kgarriso, m.andre, openshift-bugzilla-robot
Version: 4.4Keywords: UpcomingSprint
Target Milestone: ---   
Target Release: 4.4.z   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: CoreDNS forward plugin uses a default policy of random to pick the upstream server. Consequence: Clusters may not be able to resolve the OpenStack API hostname when the user sets multiple external DNS resolvers such as ['172.31.8.1','8.8.8.8'], where 172.31.8.1 knows to resolve internal hostnames and 8.8.8.8 is a public resolver that doesn't know how to resolve internal hostnames. Fix: Switch to the sequential policy to simulate the libc behavior. Result: The DNS servers specified via externalDNS option are now used in order by CoreDNS.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-14 01:43:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1809611    
Bug Blocks:    

Description Brendan Shirren 2020-06-26 01:10:49 UTC
Description of problem:

Any chance this commit [1] can be back-ported to OCP 4.4.z ??

Bug 1809611: OpenStack: Set coredns forward policy to sequencial

The default policy for CoreDNS forward plugin being random [1], the
cluster may not be able to resolve the OpenStack API hostname when the
user sets multiple external DNS resolvers such as
['172.31.8.1','8.8.8.8'], where 172.31.8.1 knows to resolve internal
hostnames and 8.8.8.8 is a public resolver that doesn't know how to
resolve internal hostnames.

Switch to the sequencial policy to simulate the libc behavior and not
surprise users who expect the DNS servers specified via `externalDNS`
option to have a hierarchy.

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

OCP 4.4

How reproducible:

Always.

Steps to Reproduce:
1. configure DNS forwarding as per [2] and want to access an external registry with a FQDN only known in the forwarded zones.
2.
3.

Actual results:

NXDOMAIN for internal hostnames that need forwarding to select upstream servers for resolving.

Expected results:

Hostnames in forwarded zones are resolvable via Coredns on node(s)

Additional info:

[1] https://github.com/openshift/machine-config-operator/commit/94a927c024dbcc72c0f427cb11b74b9644efe884

[2] https://docs.openshift.com/container-platform/4.4/networking/dns-operator.html#nw-dns-forward_dns-operator

[3] https://github.com/openshift/machine-config-operator/blob/master/manifests/openstack/coredns-corefile.tmpl#L6

Comment 3 Martin André 2020-06-29 12:14:57 UTC
*** Bug 1851911 has been marked as a duplicate of this bug. ***

Comment 6 David Sanz 2020-07-06 07:54:50 UTC
Verified on 4.4.0-0.nightly-2020-07-04-120349

Comment 8 errata-xmlrpc 2020-07-14 01:43:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2871