Re: systemd-resolved breakage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Fri, 13 Nov 2020 at 23:42, Sam Varshavchik <mrsam@xxxxxxxxxxxxxxx> wrote:
Petr Menšík writes:

> Am I missing something?

Yes, system is being shoved down your gullet, whether you like it or not.

> would NetworkManager.conf:
> dns=default
>
> Write resolv.conf again? Can I make it rewrite after disabling
> systemd-resolved? Why doesn't it restore /etc/resolv.conf on
> systemd-resolved shutdown?

Yes, /etc/resolv.conf is a symlink. Apparently NetworkManager has been 
changed to write /run/NetworkManager/resolv.conf instead, so you can set 
/etc/resolv.conf symlink to point to it.

This whole house of cards is an epic fail. There is already a perfectly 
usable architecture in place to handle this: alternatives. Both 
NetworkManager and systemd should use alternatives to claim dibs on 
/etc/resolv.conf, and alternatives will manage the symlink itself.

This is just plain dumb. /etc/resolv.conf should be an alternatives-managed 
link. If it were, you'd immediately know how to obtain the list of all the 
alternative configurations, and have a simple mechanism for selecting how 
you want DNS to be configured, and complete freedom to use or not use 
systemd-resolved. I refuse to believe that this obvious solution never 
occured to anyone, instead it was decided to intentionally cram systemd-
resolved down everyone's throat and make people jump through hoops to get 
rid of it.


Sounds reasonable considering the options for resolved itself seems to all rely on the default set by the distro, with no option to change it for the enduser. Unless they know how to faff about symlinking resolv.conf to another 'option'.....

So considering the above the below options (man page) is there a simple way in fedora to flip these options without manual symlinking?
 
 /ETC/RESOLV.CONF
       Four modes of handling /etc/resolv.conf (see resolv.conf(5)) are supported:

       ·   systemd-resolved maintains the /run/systemd/resolve/stub-resolv.conf file for compatibility with traditional Linux programs. This file may be symlinked from
           /etc/resolv.conf. This file lists the 127.0.0.53 DNS stub (see above) as the only DNS server. It also contains a list of search domains that are in use by
           systemd-resolved. The list of search domains is always kept up-to-date. Note that /run/systemd/resolve/stub-resolv.conf should not be used directly by
           applications, but only through a symlink from /etc/resolv.conf. This file may be symlinked from /etc/resolv.conf in order to connect all local clients that bypass
           local DNS APIs to systemd-resolved with correct search domains settings. This mode of operation is recommended.

       ·   A static file /usr/lib/systemd/resolv.conf is provided that lists the 127.0.0.53 DNS stub (see above) as only DNS server. This file may be symlinked from
           /etc/resolv.conf in order to connect all local clients that bypass local DNS APIs to systemd-resolved. This file does not contain any search domains.

       ·   systemd-resolved maintains the /run/systemd/resolve/resolv.conf file for compatibility with traditional Linux programs. This file may be symlinked from
           /etc/resolv.conf and is always kept up-to-date, containing information about all known DNS servers. Note the file format's limitations: it does not know a concept
           of per-interface DNS servers and hence only contains system-wide DNS server definitions. Note that /run/systemd/resolve/resolv.conf should not be used directly by
           applications, but only through a symlink from /etc/resolv.conf. If this mode of operation is used local clients that bypass any local DNS API will also bypass
           systemd-resolved and will talk directly to the known DNS servers.

       ·   Alternatively, /etc/resolv.conf may be managed by other packages, in which case systemd-resolved will read it for DNS configuration data. In this mode of
           operation systemd-resolved is consumer rather than provider of this configuration file.

       Note that the selected mode of operation for this file is detected fully automatically, depending on whether /etc/resolv.conf is a symlink to
       /run/systemd/resolve/resolv.conf or lists 127.0.0.53 as DNS server.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux