Bug 1992228

Summary: Windows kubelet.conf DNS server ip hardcoded
Product: OpenShift Container Platform Reporter: Mohammad Saif Shaikh <mohashai>
Component: Windows ContainersAssignee: Team Windows Containers <team-winc-bot>
Status: CLOSED DUPLICATE QA Contact: gaoshang <sgao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.8CC: aos-bugs
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-18 15:35:09 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:

Description Mohammad Saif Shaikh 2021-08-10 18:41:24 UTC
Description of problem:
Windows Containers are assigned a hardcoded DNS server address of 172.30.0.10 (based on a CIDR of 10.132.0.0/14). This is does not take into account user-defined custom network settings, specifically hybridClusterNetwork options https://docs.openshift.com/container-platform/4.8/networking/ovn_kubernetes_network_provider/configuring-hybrid-networking.html#configuring-hybrid-ovnkubernetes_configuring-hybrid-networking, assigning incorrect an value to the k8s DNS server.

How reproducible:
Always

Steps to Reproduce:
1. Spin up a cluster using a custom subnet (for example, 100.124.0.0/16)
2. Bring up a workload on a Windows node configured through the WMCO.
3. Observe container's DNS server IP to be 172.30.0.10 (instead of 100.123.0.10 in this example)

Actual results:
Containers running on Windows nodes always get assigned 172.30.0.10 as their DNS server address.

Expected results:
Containers running on Windows nodes should get assigned a DNS server address based on the overlay network config CIDR.

Additional info:
"clusterDNS"is hardcoded to "172.30.0.10" (and never overridden) in the kubelet config template in the Windows Machine Config Bootstrapper https://github.com/openshift/windows-machine-config-bootstrapper/blob/master/pkg/bootstrapper/bindata.go#L57.

Comment 2 Mohammad Saif Shaikh 2021-08-18 15:35:09 UTC

*** This bug has been marked as a duplicate of bug 1994859 ***