Bionic autopkgtests failing due to stderr output present and not ignored
Bug #1830180 reported by
Łukasz Zemczak
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-fan (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This seems to be happening at least for i386, ppc64el and arm64:
II: Removing Fan Bridge...
de-configuring fan underlay:
PASS
autopkgtest [23:52:05]: test lxd: -------
autopkgtest [23:52:05]: test lxd: - - - - - - - - - - results - - - - - - - - - -
lxd FAIL stderr: sd_bus_open_system: No such file or directory
autopkgtest [23:52:05]: test lxd: - - - - - - - - - - stderr - - - - - - - - - -
sd_bus_open_system: No such file or directory
autopkgtest [23:52:06]: @@@@@@@
docker PASS
lxd FAIL stderr: sd_bus_open_system: No such file or directory
Exit request sent.
To post a comment you must log in.
This happens because systemd-resolve --status $nic can be called in this loop before it's ready to answer:
dns2= $(systemd- resolve --status $nic1| \
break
timeout= $(( timeout - 2 ))
while [ $timeout -gt 0 ]; do
awk '/DNS Servers:/{print; exit}')
if [ "$dns2" != "" ]; then
fi
echo "$role: waiting for systemd resolver..."
sleep 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: bus_open_ system: No such file or directory[0m
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_
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.