With RHEL/Rocky Linux 8 and later releases that are being used by software images for compute nodes, you may find that the NetworkManager service is overwriting the /etc/resolv.conf file on the compute node after it has been provisioned by the BCM node installer.
For example:
[root@hpc077 ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search local
If this is happening on a compute node, then a configuration file for NetworkManager may be created in the /etc/NetworkManager/conf.d/ directory on the node’s software image that will tell NetworkManager not to manage /etc/resolv.conf. The following commands may be run on the active head node to create such a file for a given software image:
# cat <
[main]
dns=none
EOF
Replace
For example, if the name of the software image is “compute”, then you would run these commands:
# cat <
[main]
dns=none
EOF
Then, the compute node may be rebooted over the network so that it gets reprovisioned by the BCM node installer. The node installer will generate the /etc/resolv.conf file on the compute node using the nameserver and search domain settings that you have specified in BCM. When the node comes online, /etc/resolv.conf will no longer be getting overwritten by the NetworkManager service.