Network interface not coming up due to missing /etc/rcS.d/*networking

Bug #1439109 reported by Iain Lane
32
This bug affects 9 people
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

This used to work fine; now when I start my container there's no network inside. Manually bringing the interface up (ifup eth0 or systemctl start ifup@eth0) works.

What information would be useful for you?

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: systemd 219-5ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-10.10-generic 3.19.2
Uname: Linux 3.19.0-10-generic x86_64
ApportVersion: 2.17-0ubuntu1
Architecture: amd64
Date: Wed Apr 1 11:35:28 2015
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
MachineType: System manufacturer System Product Name
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/zsh
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-10-generic root=UUID=980689ca-e7d9-4a99-8230-33b8b6e917cd ro nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw nomdmonddf nomdmonisw systemd.debug-shell nomdmonddf nomdmonisw nomdmonddf nomdmonisw
SourcePackage: systemd
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/17/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1201
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: P8Z77-V LX
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1201:bd08/17/2012:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnP8Z77-VLX:rvrRevX.0x:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :

I tried downgrading to -4ubuntu7 inside the container - no change.

Revision history for this message
Iain Lane (laney) wrote :

Still happening with 6ubuntu1

● ifup-wait-all-auto.service loaded failed failed Wait for all "auto" /etc/network/interfaces to be up for network-online.target

laney@vivid> systemctl status <email address hidden>
● <email address hidden> - ifup for eth0
   Loaded: loaded (/lib/systemd/system/ifup@.service; static; vendor preset: enabled)
   Active: inactive (dead)

laney@vivid> 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

auto eth0
iface eth0 inet dhcp

Revision history for this message
Iain Lane (laney) wrote :

Also I noticed that in this state there's no /run/network/ifstate file which causes ifquery to segfault. That's not the bug here but it is hit by ifup-wait-all-auto.service each time.

Revision history for this message
Iain Lane (laney) wrote :

I guess that could be fixed with "f /run/network/ifstate 0644 root root -" in tmpfiles

Revision history for this message
Iain Lane (laney) wrote :

laney@vivid> systemctl status -l networking
● networking.service - LSB: Raise network interfaces.
   Loaded: loaded (/etc/init.d/networking)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
        /lib/systemd/system/networking.service.d
           └─systemd.conf
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

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

I suppose this is the reason:

Apr 01 11:33:03 hostname systemd[1]: Failed to start LSB: AppArmor initialization.
Apr 01 11:33:03 hostname systemd[1]: apparmor.service failed.

apparmor blocks quite a lot, so we need to fix that in a container.

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

Debugged on IRC. For the record, the link in /etc/rcS.d/*networking was missing. Hence the sysv-generator didn't create a networking.service and didn't attempt to start it.

I just created a fresh vivid container and the link does exist, and network is coming up fine for me. Can you reproduce this somehow?

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Iain Lane (laney) wrote :

laney@vivid> /usr/lib/insserv/insserv -n networking
insserv: warning: current start runlevel(s) (empty) of script `networking' overrides LSB defaults (S).
insserv: warning: current start runlevel(s) (empty) of script `networking' overrides LSB defaults (S).

I think it comes down to this

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

Shouldn't this rather be "sudo update-rc.d networking defaults"? That won't actually put back a removed symlink as this counts as user change that needs to be preserved. So the question is still what made this disappear?

no longer affects: systemd (Ubuntu)
tags: added: systemd-boot
Revision history for this message
Martin Pitt (pitti) wrote :

For the record, this is how to clean up:

  sudo update-r.cd networking remove
  sudo update-r.cd networking defaults

Vincent has the same problem, and he mentioned that he has an /etc/init.d/networking.dpkg-old; that sounds like ifupdown once failed to upgrade/configure?

summary: - Network interface not coming up automatically inside lxc container
+ Network interface not coming up due to missing /etc/rcS.d/*networking
affects: insserv (Ubuntu) → ifupdown (Ubuntu)
Revision history for this message
Iain Lane (laney) wrote :

I don't have a dpkg-old there, looking at dpkg.log* doesn't show any failed configures.

Indeed I already did restore it using this trick.

Isn't insserv responsible for creating the symlinks? Although maybe it considers the removed symlink to be a preservable change too.

Martin Pitt (pitti)
Changed in ifupdown (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Martin Pitt (pitti)
Changed in ifupdown (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

I uploaded a new ifupdown which cleans this up on upgrades, needs release team review.

Changed in ifupdown (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ifupdown - 0.7.48.1ubuntu8

---------------
ifupdown (0.7.48.1ubuntu8) vivid; urgency=medium

  * debian/postinst: Bring back missing /etc/rcS.d/networking symlink, to
    clean up after old broken upgrades. (LP: #1439109)
 -- Martin Pitt <email address hidden> Wed, 08 Apr 2015 12:02:39 +0200

Changed in ifupdown (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

fixed it for me, thanks!

Revision history for this message
Rustom (rustompmody) wrote :

Firstly note that this is more like bug #1432173.
Adding this comment here since that is a duplicate of this one

I get :

$ systemctl status -l ifup-wait-all-auto.service
● ifup-wait-all-auto.service - Wait for all "auto" /etc/network/interfaces to be up for network-online.target
   Loaded: loaded (/lib/systemd/system/ifup-wait-all-auto.service; static; vendor preset: enabled)
   Active: active (exited) since Mon 2015-11-16 07:33:22 IST; 27s ago
     Docs: man:interfaces(5)
           man:ifup(8)
  Process: 514 ExecStart=/bin/sh -ec for i in $(ifquery --list --exclude lo --allow auto); do INTERFACES="$INTERFACES$i "; done; [ -n "$INTERFACES" ] || exit 0; while ! ifquery --state $INTERFACES >/dev/null; do sleep 1; done; for i in $INTERFACES; do while [ -e /run/network/ifup-$i.pid ]; do sleep 0.2; done; done (code=exited, status=0/SUCCESS)
 Main PID: 514 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/ifup-wait-all-auto.service

Nov 16 07:32:53 xxx systemd[1]: Starting Wait for all "auto" /etc/network/interfaces to be up for network-online.target...
Nov 16 07:32:54 xxx sh[514]: Segmentation fault
Nov 16 07:33:22 xxx systemd[1]: Started Wait for all "auto" /etc/network/interfaces to be up for network-online.target.
$ sudo vi /etc/resolv.conf

I tried what looked like solutions offered here:
1.
$ sudo update-rc.d networking remove
$ sudo update-rc.d networking defaults

[I am assuming that r.cd is a misspelling of rc.d]

No change

2. Reinstalled ifupdown
I believe I used to see two segfaults. Now I see one

Ubuntu wily
ifupdown 0.7.54ubuntu1
systemd 225-1ubuntu9

$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto enp7s0
iface enp7s0 inet dhcp

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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