#765400 networking.service started too early - PCMCIA NIC not brought up

Package:
ifupdown
Source:
ifupdown
Description:
high level tools to configure network interfaces
Submitter:
Charles-François Natali
Date:
2014-11-27 01:48:05 UTC
Severity:
normal
#765400#5
Date:
2014-10-14 18:27:08 UTC
From:
To:
Since systemd made it to Jessie, my wireless network interface - which
is a PCMCIA card - is randomly not brought up upon startup.

One can see this in the logs:
oct. 14 18:43:16 neobox wpa_supplicant[311]: Could not read interface
wlan1 flags: No such device
oct. 14 18:43:16 neobox wpa_supplicant[311]: Could not read interface
wlan1 flags: No such device
oct. 14 18:43:16 neobox wpa_supplicant[311]: Could not read interface
wlan1 flags: No such device
oct. 14 18:43:16 neobox wpa_supplicant[311]: WEXT: Could not set
interface 'wlan1' UP
oct. 14 18:43:16 neobox wpa_supplicant[311]: wlan1: Failed to
initialize driver interface
oct. 14 18:43:16 neobox networking[251]: run-parts:
/etc/network/if-pre-up.d/wpasupplicant exited with return code 1
oct. 14 18:43:16 neobox networking[251]: Failed to bring up wlan1.
oct. 14 18:43:16 neobox networking[251]: done.

Indeed, the NIC is only probed later (probably when systemd-udevd runs
because it's a PCMCIA card):
oct. 14 18:43:17 neobox kernel: rt2500pci 0000:02:00.0: enabling
device (0000 -> 0002)
oct. 14 18:43:17 neobox kernel: ieee80211 phy1: rt2x00_set_chip: Info
- Chipset detected - rt: 2560, rf: 0003, rev: 0004
oct. 14 18:43:17 neobox kernel: ieee80211 phy1: Selected rate control
algorithm 'minstrel_ht'
oct. 14 18:43:17 neobox systemd-udevd[484]: renamed network interface
wlan0 to wlan1


This is pretty random, but occurs at least 1 out of 4 boots, and is
rather annoying.

I'm include the output of "systemctl list-dependencies" and
journalctl, but don't hesitate if any more information is needed.

Cheers,

#765400#10
Date:
2014-10-14 18:41:23 UTC
From:
To:
Am 14.10.2014 um 20:27 schrieb Charles-François Natali:

Please attach /etc/network/interfaces.

#765400#15
Date:
2014-10-14 18:54:17 UTC
From:
To:
Attached.
Note that eth0 doesn't have cable plugged in and should probably be
commented out.

#765400#20
Date:
2014-11-27 01:45:27 UTC
From:
To:
control: reassign -1 ifupdown

Am 14.10.2014 um 20:54 schrieb Charles-François Natali:

This is ultimately a limitation/design choice of ifupdown, specifically
of "auto" interfaces.

To bring up your interface race-free, i.e. when your hardware is
actually plugged in and available, you'd have to use allow-hotplug, as
this activates the interface via udev. allow-hotplug does have other
downsides though.

I think, this is ultimately only fixable by ifupdown becoming a daemon
which listens for uevents and configures the interfaces when they show up.

For jessie I suggested a workaround in [1], which runs "udevadm settle"
in /etc/init.d/networking, so makes it more likely to succeed.

I'm re-assigning this bug to ifupdown, as it is not directly related to
systemd. It should probably be merged with [1].

It would probably be helpful, if you can test the patch from [2]

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766943#124
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766943#129