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.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to ubuntu-fan in Ubuntu.
https://bugs.launchpad.net/bugs/1830180

Title:
  Bionic autopkgtests failing due to stderr output present and not
  ignored

Status in ubuntu-fan package in Ubuntu:
  Fix Released
Status in ubuntu-fan source package in Bionic:
  Confirmed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-fan/+bug/1830180/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to