Unfortunately resolvconf does not have a --no-scripts or similar option that would disable running the update.d/ hooks. One possible local workaround is to change /lib/systemd/system/systemd- resolved.service.d/resolvconf.conf from
ExecStopPost=+/bin/sh -c '[ ! -e /run/resolvconf/enable-updates ] || /sbin/resolvconf -d systemd-resolved' to ExecStopPost+=/bin/rm -f /run/resolvconf/interface/systemd-resolved or to drop the line completely. This solves the hang on shutdown, but it does not drop 127.0.0.53 any more from /etc/resolv.conf if you manually stop systemd-resolved.service in a running system. This should actually happen the same way with dnsmasq or any other local DNS server -- if only that is in resolv.conf, then the Avahi hook script would run into this timeout on "host" as well, as the local name server is already gone. Our workaround for that in 16.04 was to never stop dnsmasq even when NetworkManager.service got stopped (via KillMode=process). However, when you do stop dnsmasq then you get similar hangs with trying to do DNS queries. At the moment, if you stop the local DNS server then there is nothing that would magically bring back the non-local DNS servers into resolv.conf (neither in zesty with resolved nor in 16.04 with dnsmasq), so you would run into timeouts either way. Thus I think just dropping the ExecStopPost= does not actually make things worse, but it fixes the hang on shutdown. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1648068 Title: systemd-resolved.service hangs a long time on shutdown Status in systemd package in Ubuntu: Fix Committed Bug description: On shutdown or "systemctl stop systemd-resolved" you get a long hang: ● systemd-resolved.service - Network Name Resolution CGroup: /system.slice/systemd-resolved.service └─control ├─15479 /bin/sh -c [ ! -e /run/resolvconf/enable-updates ] || /sbin/resolvconf -d systemd-resolved ├─15480 run-parts --arg=-d --arg=systemd-resolved /etc/resolvconf/update.d ├─15483 run-parts /etc/resolvconf/update-libc.d ├─15497 /bin/sh /usr/lib/avahi/avahi-daemon-check-dns.sh └─15509 host -t soa local. So that resolvconf hook tries to do name resolution which does not work any more at that time. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1648068/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp