cloud-pak-ocp-4 icon indicating copy to clipboard operation
cloud-pak-ocp-4 copied to clipboard

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

Open hughjfchen opened this issue 2 years ago • 1 comments

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 avatar Oct 26 '22 02:10 hughjfchen

Fix by #38

hughjfchen avatar Oct 26 '22 07:10 hughjfchen