coreos / fedora-coreos-tracker

Issue tracker for Fedora CoreOS
https://fedoraproject.org/coreos/
262 stars 59 forks source link

PowerVS: Networking Manager Overwriting systemd resolve.conf" #1628

Open ravanelli opened 9 months ago

ravanelli commented 9 months ago

Describe the bug

if the instance is rebooted the Networking Manager is overwriting the /etc/resolve.conf

Reproduction steps

Launch an instance using 'Fedora CoreOS 39.20231101.1.0' in PowerVs, ~change~ update (see comments) /etc/resolve.conf reboot the system

Expected behavior

Not overwriting done

Actual behavior

if the instance is rebooted the Networking Manager is overwriting the /etc/resolve.conf

System details

PowerVs

Butane or Ignition config

No need

Additional information

No response

dustymabe commented 9 months ago

What you are experiencing is probably systemd-resolved that's overwritting the file because DNSStubListener=yes is the default (see /etc/systemd/resolved.conf). If you want to add some entries I think you can set them in the NetworkManager keyfile (which I think then passes them to systemd-resolved) or you can add a snippet to /etc/systemd/resolved.conf or new file in /etc/systemd/resolved.conf.d/mydns.conf I think.

jlebon commented 9 months ago

I think the issue we were seeing was that we couldn't get DNS resolution to internal hostnames when using systemd-resolved, even though the VPN DNS servers were listed in the systemd-resolved stub. So we ended up just un-symlinking, disabling systemd-resolved and manually defining /etc/resolv.conf.

dustymabe commented 9 months ago

so you disabled systemd-resolved.service, but NetworkManager was still somehow removing your settings from /etc/resolv.conf that you had set statically?

ravanelli commented 9 months ago

We tried a lot of things, as:

One of the last times I edited it I did:


sudo systemctl disable systemd-resolved `to remove the links created`
sudo systemctl stop systemd-resolved
rm /etc/resolv.conf 
Recreated it with the changes I needed
sudo systemctl enable systemd-resolved 
sudo systemctl start systemd-resolved

I also tried it via resolvectl

dustymabe commented 9 months ago

If you are re-enabling systemd-resolved with DNSStubListener=yes set then you'll continue to have the problem. If you want to set some DNS manually I would suggest putting some entries in either the NM keyfile with the other settings (there are some examples of this in our docs) OR set it in a new /etc/systemd/resolved.conf.d/mydns.conf file directly.

I can hop on a screenshare sometime this week if that would be helpful.