This happens because systemd-resolve --status $nic can be called in this loop
before it's ready to answer:
while [ $timeout -gt 0 ]; do
dns2=$(systemd-resolve --status $nic1| \
awk '/DNS Servers:/{print; exit}')
if [ "$dns2" != "" ]; then
break
fi
echo "$role: waiting for systemd resolver..."
sleep 2
timeout=$(( timeout - 2 ))
done
We can see from the logs that in the second loop run (i.e., after 2s), it works
already, or else it would have printed "$role: waiting for systemd resolver..."
again:
Starting fanatic-test
lxd test: Waiting for addresses on eth0 ...
lxd test: Waiting for addresses on eth0 ...
lxd test: Waiting for addresses on eth0 ...
lxd test: Waiting for addresses on eth0 ...
lxd test: Waiting for addresses on eth0 ...
slave: detected primary route through eth0
[0;1;31msd_bus_open_system: No such file or directory[0m
slave: waiting for systemd resolver... <----- just once, and the first time
slave: DNS: systemd(250.40.8.1)
The fix is to add 2>/dev/null to that systemd-resolve call, or allow for
stderr in the dep8 test.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1830180
Title:
Bionic autopkgtests failing due to stderr output present and not
ignored
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-fan/+bug/1830180/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs