Booting stuck at network bringup with bond interfaces

Bug #1414544 reported by Stéphane Graber
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

root@lantea:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# Physical network interfaces
auto eth0
iface eth0 inet manual
    bond-master bond0

auto eth1
iface eth1 inet manual
    bond-master bond0

# Bond
auto bond0
iface bond0 inet dhcp
    bond-slaves none
    bond-mode 802.3ad
    bond-miimon 100
    hwaddress 00:1b:21:2c:0d:4b

That's a fairly common bond configuration which works great with upstart but which when booting with systemd will hang at network bringup time.

Tags: systemd-boot
Revision history for this message
dino99 (9d9) wrote :

here is mine , on vivid i386 booting with systemd:

# The loopback network interface
auto lo
iface lo inet loopback

nothing else here, but some 'cosmetic' troubles: lp:1414426

so i suppose ip6 is your issue; what happen if you comment it out ?

Revision history for this message
Martin Pitt (pitti) wrote :

I'm trying to reproduce this in a VM with two ethernet cards (-net user -net nic,model=virtio -net nic,model=virtio). Like that it fails with

$ sudo ifup -a
Cannot find device "bond0"
Failed to bring up bond0.

I tried to install ifenslave, is that the package you are using/have installed too? With that I get further: "sudo ifup -a" succeeds in a second with "Waiting for bond master bond0 to be ready", "ip a" shows that eth0 and eth1 are UP, eth0 has 10.0.2.15, eth1 has no IP, and bond0 is UP and has 10.0.2.16.

"ip route" looks a little odd:

default via 10.0.2.2 dev bond0
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
10.0.2.0/24 dev bond0 proto kernel scope link src 10.0.2.16

so I have two routes to the same network. IP connections don't actually work, neither outside, nor inside, even through the local port forwarding (-redir tcp:22000::22).

This is all with upstart, so I guess I don't understand yet how bond interfaces are supposed to work and how to reproduce them.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, after a reboot the route now looks cleaner:

default via 10.0.2.2 dev bond0
10.0.2.0/24 dev bond0 proto kernel scope link src 10.0.2.16

and outgoing connections now work. Incoming connections through QEMU port forwarding is still hanging though, i. e. I can't ssh into the VM..

Revision history for this message
Martin Pitt (pitti) wrote :

I can reproduce the hang with booting systemd.

Changed in systemd (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → Triaged
tags: added: systemd-boot
summary: - Machine never boots, stuck at network bringup
+ Booting stuck at network bringup with bond interfaces
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, -redir only redirects to the first DHCP address (10.0.2.15). So the trick with QEMU is to set up two redirections:

kvm -m 2048 -snapshot -drive file=/srv/vm/adt-vivid-amd64-cloud.img,if=virtio -net user,hostfwd=::22000-:22,hostfwd=::22001-10.0.2.16:22 -net nic,model=virtio -net nic,model=virtio

Then 22000 will go to eth0, and 22001 will go to bond0.

Revision history for this message
Martin Pitt (pitti) wrote :

Indeed under systemd I see that /etc/init.d/networking is hanging at "waiting for bond master bond0 to be ready".

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in systemd (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.6 KiB)

This bug was fixed in the package systemd - 218-6ubuntu1

---------------
systemd (218-6ubuntu1) vivid; urgency=medium

  * Merge with Debian unstable. Remaining Ubuntu changes:
    - Hack to support system-image read-only /etc, and modify files in
      /etc/writable/ instead.
    - Keep our much simpler udev maintainer scripts (all platforms must
      support udev, no debconf).
    - initramfs init-top: Drop $ROOTDELAY, we do that in a more sensible way
      with wait-for-root. Will get applicable to Debian once Debian gets
      wait-for-root in initramfs-tools.
    - initramfs init-bottom: If LVM is installed, settle udev,
      otherwise we get missing LV symlinks. Workaround for LP #1185394.
    - Add debian/udev.lvm2.init: Dummy SysV init script to satisfy insserv
      dependencies to "lvm2" which is handled with udev rules in Ubuntu.
    - Provide shutdown fallback for upstart. (LP: #1370329)
    - debian/extra/ifup@.service: Additionally run for "auto" class. We don't
      really support "allow-hotplug" in Ubuntu at the moment, so we need to
      deal with "auto" devices appearing after "/etc/init.d/networking start"
      already ran. (LP: #1374521)
    - Add Get-RTC-is-in-local-time-setting-from-etc-default-rc.patch: In
      Ubuntu we currently keep the setting whether the RTC is in local or UTC
      time in /etc/default/rcS "UTC=yes|no", instead of /etc/adjtime.
      (LP: #1377258)
    - Put session scopes into all cgroup controllers. This makes unprivileged
      user LXC containers work under systemd. (LP: #1346734)
    - Lower Breaks: to plymouth version which has the udev inotify fix in
      Ubuntu.
    - Lower libappamor1 dep to the Ubuntu version where it moved to /lib.
    - Make failure of boot-and-services NSpawn.test_boot non-fatal for now.
      This currently fails when being triggered by Jenkins, but is totally
      unreproducible when running this manually on the exact same machine.

    Upgrade fixes, keep until 16.04 LTS release:
    - systemd Conflicts/Replaces/Provides systemd-services.
    - Remove obsolete systemd-logind upstart job.
    - Clean up obsolete /etc/udev/rules.d/README.

  * Make the "systemd" controller session scope cgroup directory owned by the
    user as well. This fixes user containers with latest LXC, and with systemd
    in the container. (LP: #1413927)
  * ifup@.service: Drop dependency on networking.service (i. e.
    /etc/init.d/networking), and merely ensure that /run/network exists. This
    avoids unnecessary dependencies/waiting during boot and dependency cycles
    if hooks wait for other interfaces to come up (like ifenslave with bonding
    interfaces). (LP: #1414544)

systemd (218-6) experimental; urgency=medium

  [ Martin Pitt ]
  * initramfs hook: Install 61-persistant-storage-android.rules if it exists.
  * Generate POT file during package build, for translators.
  * Pull latest keymaps from upstream git.
  * Order ifup@.service and networking.service after network-pre.target.
    (Closes: #766938)
  * Tone down "Network interface NamePolicy= disabled on kernel commandline,
    ignoring" info message to debug, as we expect this while we disable
    net.ifnames by de...

Read more...

Changed in systemd (Ubuntu):
status: Fix Committed → 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.