Bug#919690: ifupdown: ifquery from ifup@.service fails with exit code 1 on boot

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#919690: ifupdown: ifquery from ifup@.service fails with exit code 1 on boot

Benjamin Drung-7
Package: ifupdown
Version: 0.8.34
Severity: important

Hi,

I have a Debian live system (using live-boot) launched in QEMU with a
static network configuration. live-boot brings up the network interface
ens3 in the initrd to fetch the squashfs root image.

The [hidden email] fails:

```
$ systemctl status [hidden email]
‚óŹ [hidden email] - ifup for ens3
   Loaded: loaded (/lib/systemd/system/ifup@.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-01-18 15:26:29 UTC; 9min ago
  Process: 696 ExecStart=/bin/sh -ec ifup --allow=hotplug ens3; ifquery --state ens3 (code=exited, status=1/FAILURE)
 Main PID: 696 (code=exited, status=1/FAILURE)

Jan 18 15:26:29 systemd[1]: Started ifup for ens3.
Jan 18 15:26:29 systemd[1]: [hidden email]: Main process exited, code=exited, status=1/FAILURE
Jan 18 15:26:29 systemd[1]: [hidden email]: Failed with result 'exit-code'.
```

Adding --verbose to ifup and ifquery revealed that ifquery fails with
exit code 1, but does not produce any output. The journal shows that
[hidden email] exits before ens3 is ready:

```
Jan 18 15:26:29 systemd[1]: Started ifup for ens3.
Jan 18 15:26:29 systemd[1]: [hidden email]: Main process exited, code=exited, status=1/FAILURE
Jan 18 15:26:29 systemd[1]: [hidden email]: Failed with result 'exit-code'.
Jan 18 15:26:30 systemd-udevd[491]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan 18 15:26:30 systemd-udevd[491]: Could not generate persistent MAC address for ethoipsix0: No such file or directory
Jan 18 15:26:30 kernel: IPv6: ADDRCONF(NETDEV_UP): ens3: link is not ready
Jan 18 15:26:30 kernel: e1000: ens3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Jan 18 15:26:30 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): ens3: link becomes ready
```

-- Package-specific info:
--- /etc/network/interfaces:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens3
iface ens3 inet static
    address 10.91.240.1/22
    pre-up ip address flush dev $IFACE
    up ip route add 10.0.0.0/8 via 10.91.243.254 dev $IFACE
    up ip route add 192.168.0.0/16 via 10.91.243.254 dev $IFACE
    up sysctl -w net.ipv4.conf.ens3.forwarding=0

--- up and down scripts installed:
/etc/network/if-down.d:
total 1
-rwxr-xr-x 1 root root 256 Apr  1  2016 resolvconf

/etc/network/if-post-down.d:
total 0

/etc/network/if-pre-up.d:
total 1
-rwxr-xr-x 1 root root 344 Jun 30  2016 ethtool

/etc/network/if-up.d:
total 3
-rwxr-xr-x 1 root root  817 Apr  1  2016 000resolvconf
-rwxr-xr-x 1 root root 1685 Jun 30  2016 ethtool


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ifupdown depends on:
ii  adduser   3.118
ii  iproute2  4.20.0-2
ii  libc6     2.28-5
ii  lsb-base  10.2018112800

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.4.1-2

Versions of packages ifupdown suggests:
pn  ppp     <none>
pn  rdnssd  <none>

-- no debconf information
Reply | Threaded
Open this post in threaded view
|

Bug#919690: ionit runs too late for /etc/network/interfaces

Benjamin Drung-6
reassign 919690 ionit 0.2.1-1
severity 919690 serious
retitle 919690 ionit runs too late for /etc/network/interfaces
thanks

Hi,

I finally troubleshot this issue. live-boot creates a
/etc/network/interfaces file that contains an allow-hotplug for the
network boot device. systemd-udev-trigger.service executes
/lib/udev/rules.d/80-ifupdown.rules which calls /lib/udev/ifupdown-
hotplug. This scripts starts [hidden email]. Afterwards ionit runs
and replaces allow-hotplug by auto. Then networking.service and
[hidden email] start at the same time and race.

--
Benjamin Drung
System Developer
Debian & Ubuntu Developer

1&1 IONOS Cloud GmbH | Greifswalder Str. 207 | 10405 Berlin | Germany
E-mail: [hidden email] | Web: www.ionos.de

Head Office: Berlin, Germany
District Court Berlin Charlottenburg, Registration number: HRB 125506 B
Executive Management: Christoph Steffens, Matthias Steinberg, Achim
Weiss

Member of United Internet