Bug 1794699

Summary: baremetal: DNS server prepend via dhclient doesn't work for ipv6
Product: OpenShift Container Platform Reporter: Steven Hardy <shardy>
Component: Machine Config OperatorAssignee: Steven Hardy <shardy>
Status: CLOSED CURRENTRELEASE QA Contact: Amit Ugol <amit.ugol>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: augol, mnguyen, travier
Target Milestone: ---   
Target Release: 4.3.z   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1794661 Environment:
Last Closed: 2020-08-05 05:44:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1794661, 1796618    
Bug Blocks:    

Description Steven Hardy 2020-01-24 11:17:09 UTC
+++ This bug was initially created as a clone of Bug #1794661 +++

The prepend via dhclient doesn't work via ipv6, so we need to switch to a
NetworkManager dispatcher that runs after dhclient instead as a

- What I did

Reworked the prepender implementation to avoid using the prepend domain-name-servers option in dhclient.conf - it seems this option only works for ipv4[1] and the suggested alternative of prepend dhcp6.name-servers also doesn't seem to work when the resolv.conf is managed by NetworkManager.

Instead we configure NetworkManager to no longer manage the resolv.conf directly, and rely on a dispatcher script which injects the necessary IP on master/worker nodes to correctly reference coredns for the baremetal platform.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=643890

- How to verify it

Deploy with ipv4 and ipv6, confirm that on the masters the DNS VIP is prepended to the resolv.conf, and on the workers the local nic IP for the controlplane network (not the DNS VIP) is configured.

Also check sudo journalctl -b | grep prepender to see the log output from the dispatcher scripts.

- Description for the changelog

For the baremetal platform management of the resolv.conf is now handled via a NetworkManager dispatcher script, so that the necessary DNS server can be prepended for both ipv4 and ipv6 environments.

Comment 2 Dan Winship 2020-02-07 14:25:28 UTC
Assigning all 4.3.z IPv6 bugs to Marius Cornea for QA, as they are not yet QA-able in stock release-4.3 builds.

Comment 3 Marius Cornea 2020-02-11 21:58:13 UTC
This BZ cannot be verified for now on the 4.3-ipv6 release as the latest build(4.3.0-0.nightly-2020-02-10-055634-ipv6.3) includes a custom machine-config-operator image according to https://github.com/openshift-kni/ocp-ipv6/blob/master/builds.yaml