Bionic autopkgtests failing due to stderr output present and not ignored

Bug #1830180 reported by Łukasz Zemczak
6
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:10.42.0.0/16 overlay:250.0.0.0/8
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]: @@@@@@@@@@@@@@@@@@@@ summary
docker PASS
lxd FAIL stderr: sd_bus_open_system: No such file or directory
Exit request sent.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

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
sd_bus_open_system: No such file or directory
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.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This was fixed in 0.12.11 by adding allow-stderr to the dep8 restrictions. Last affected ubuntu release is bionic and earlier. Closing the bug.

Changed in ubuntu-fan (Ubuntu):
status: New → Fix Released
status: Fix Released → Confirmed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Actuall, the bug was specifically about bionic, so let's adjust the tasks.

Changed in ubuntu-fan (Ubuntu Bionic):
status: New → Confirmed
Changed in ubuntu-fan (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.