Bug 1957615

Summary: Kubelet bound to incorrect IPs when using 2 interfaces, referring to incorrect NICs in 4.6.x
Product: OpenShift Container Platform Reporter: Neeraj <nbhatt>
Component: Machine Config OperatorAssignee: Yu Qi Zhang <jerzhang>
Status: CLOSED DUPLICATE QA Contact: Michael Nguyen <mnguyen>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.6CC: aos-install, bleanhar, fiezzi, hchatter, mstaeble, openshift-bugs-escalate, vpagar
Target Milestone: ---   
Target Release: ---   
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-05-06 16:13:04 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 Neeraj 2021-05-06 07:17:53 UTC
Version:
- OCP 4.6

$ openshift-install version
- 4.6

Platform:

- Baremetal on vmware

Please specify:
- UPI 

What happened?

- Installation is getting failed as the kubelet is not taking the correct IP address.
- Using 2 network interfaces 
- 
- Hostname is resolving to 1st interface IP address. Hence, when setting the hostname via nmtui or via kernel arguments, it's not taking it and, default set as localhost after boot.
- After debugging a lot, it was found that kubelet is taking 2nd interface IP address. Due to this, the etcd pods is getting 2nd interface IP address and hence, scaling of the etcd is failing on masters.

- File name with incorrect IP:
   /etc/systemd/system/kubelet.service.d/20-nodenet.conf

What did you expect to happen?

- It must take 1st IP address and installation should work smoothly

How to reproduce it (as minimally and precisely as possible)?
- Boot the master with 2 interfaces without bonding "IP ns IP ns" or using nmtui set hostnames and IP address. After booting you will see the errors in etcd as IP is incorrect and file contains 2nd interface IP.