*** This bug is a duplicate of bug 1907878 *** https://bugs.launchpad.net/bugs/1907878
I've run into the same problem on a server upgraded from 18.04 to 20.04 and 22.04. After the last upgrade step, DNS did not work anymore. It seems that DNS information does not get properly propagated from ifupdown configuration (/etc/network/interfaces) to systemd-resolved. The main issue seems to be this error: ``` /etc/network/if-up.d/resolved: 70: DNS: not found ``` It seems that the state files e.g. /run/network/ifupdown-inet-eth0 contain the following string: ``` "DNS"="<ip-of-dns>" When the script tries to source the file around line 78, this fails. I fixed it by removing the quotes around $DNS and $DOMAINS on line 47 and 51. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ifupdown in Ubuntu. https://bugs.launchpad.net/bugs/1910273 Title: Upgrade to groovy breaks DNS resolution Status in ifupdown package in Ubuntu: Confirmed Bug description: ~# lsb_release -rd Description: Ubuntu 20.10 Release: 20.10 ~# apt-cache policy ifupdown ifupdown: Instalēts: 0.8.35ubuntu2 Kandidāts: 0.8.35ubuntu2 Versiju tabula: *** 0.8.35ubuntu2 500 500 http://mirrors.digitalocean.com/ubuntu groovy/universe amd64 Packages 100 /var/lib/dpkg/status ~# Problem: Upon upgrade from Ubuntu 20.04 to Ubuntu 20.10, I expected name resolution upon reboot to work as usual. What happened: a) /var/log/syslog sprinkled with error messages: - /etc/network/if-up.d/resolved: 12: mystatedir: not found - /etc/network/if-up.d/resolved: 70: DNS: not found - /etc/network/if-up.d/resolved: 1: /run/network/ifupdown-inet-eth0: DNS=8.8.8.8 8.8.4.4: not found b) resolvectl dns returning no name servers Investigation: Recently changed /etc/network/if-up.d/resolved and /etc/network/if-down.d/resolved files contain programming errors. See https://git.launchpad.net/ubuntu/+source/ifupdown/commit/?id=54fec5eedfd59adaffe9021c271914578dd05d1b . Fix: $ diff /Users/pklavins/Downloads/ifupdown-0.8.35ubuntu2/debian/if-down.d/resolved if-down.d_resolved 12c12 < mystatedir statedir ifindex interface --- > # local mystatedir statedir ifindex interface $ diff /Users/pklavins/Downloads/ifupdown-0.8.35ubuntu2/debian/if-up.d/resolved if-up.d_resolved 12c12 < mystatedir statedir ifindex interface --- > # local mystatedir statedir ifindex interface 39,40c39,40 < DNS=DNS < DOMAINS=DOMAINS --- > DNS=$DNS > DOMAINS=$DOMAINS 42,43c42,43 < DNS=DNS6 < DOMAINS=DOMAINS6 --- > DNS=$DNS6 > DOMAINS=$DOMAINS6 47c47 < "$DNS"="$NEW_DNS" --- > DNS="$NEW_DNS" 51c51 < "$DOMAINS"="$NEW_DOMAINS" --- > DOMAINS="$NEW_DOMAINS" 70c70 < DNS DNS6 DOMAINS DOMAINS6 DEFAULT_ROUTE --- > # local DNS DNS6 DOMAINS DOMAINS6 DEFAULT_ROUTE $ To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1910273/+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