Comment 19 for bug 1864256

Revision history for this message
In , thaller (thaller-redhat-bugs) wrote :

> I suspect this is a NetworkManager packaging bug. I suspect the NetworkManager package previously symlinked /etc/resolv.conf to /var/run/NetworkManager/resolv.conf.

Maybe NetworkManager did that. But it only did that a (relatively) long time ago, and stopped doing that since. In that case, fix it by creating /etc/resolv.conf to be a file or (a different) symlink as desired.

Nowadays (including Fedora 32), NetworkManager never writes /etc/resolv.conf as a symlink. /etc/resolv.conf being a symlink is taken as a hint/configuration by the administrator who is in charge of resolv.conf. With `rc-manager=symlink` setting (the default, see `man NetworkManager.conf`) it would do nothing if it finds a symlink and otherwise write /etc/resolv.conf as a regular file.

> We probably need a scriptlet somewhere to clean this up, probably in the NetworkManager package, or perhaps in the systemd package. So while I do think we have a Fedora bug here, that also doesn't explain what's going wrong for you.

Regardless whether NetworkManager did it or the user, symlinking /etc/resolv.conf to /var/run/NetworkManager/resolv.conf is a possible, sensible configuration on its own (of course not in combination with using systemd-resolved). I think the upgrade to Fedora 33 should only enable systemd-resolved if /etc/resolv.conf is a regular file. And -- as already gets checked -- that it has the "generated by NetworkManager` line.

Alternatively, upgrade could also migrate such systems to systemd-resolved and reset the /etc/resolv.conf symlink. But that might not be what the user wants....

I find this bug report rather confusing. There are countless ways how to configure DNS (some working/sensible, some not). But what matters it the initial configuration, directly after upgrade -- and to find out what went wrong, why is it no longer working.

Sure, we should find out how to best fix the misconfiguration, but let's focus on first understanding what the original report and the actual misconfiguration is (and how it happened).

Note that even if the upgrade went as desired, enabling systemd-resolved means to switch from plain /etc/resolv.conf to enable split DNS. That *is* an intentional change in behavior, and you can have a DNS configuration (in NetworkManager) that happened to work previously, but stops after switching to split DNS. Of course, in most cases both should work similar enough.