IBM-ICP4D / cloud-pak-ocp-4

OpenShift 4.x deployment for Cloud Paks
20 stars 24 forks source link

Put the bastion DNS server on the top when update resolv.conf in a DHCP environment #37

Open hughjfchen opened 2 years ago

hughjfchen commented 2 years ago

Currently, if the bastion machine is assigned IP address with DHCP, it also receive the DNS server from DHCP server. Although the resolv.conf can be updated by adding the bastion address through NetworkManager ifcfg script, its address would be put below the DNS addresses from DHCP and that will make looking up a name for the OCP cluster fail. To put it on the top in the generated resolv.conf, the following line should be added to the /etc/dhcp/dhclient.conf:

prepend domain-name-servers [ip address of bastion];

A task would be needed to replace the generate dns with interface script.task if using DHCP.

hughjfchen commented 2 years ago

Fix by #38