Package: udev
Version: 175-3.1
Severity: normal
(I'm surprised net.agent was in udev.dev;
I'd have thought it would be owned by ifupdown).
There's a mismatch which stops this from working:
net_ifup():
if [ -e /sys/fs/cgroup/systemd ]; then
exec systemctl start ifup@${INTERFACE}.service
else
exec ifup --allow=hotplug $INTERFACE
fi
net_ifdown():
exec ifdown --allow=hotplug $INTERFACE
i) I applied the obvious fix and it seems to help.
<off-topic>
ii) There's some other bug with shutting down wpa_supplicant,
which sometimes causes it to fail (I'm using wireless).
</off-topic>
iii) More importantly, the obvious fix may be the wrong one.
I'm concerned that there's a big UI fail here for "normal users".
When systemd starts the interface, it means
you shouldn't use "ifdown wlan0" -
you should use "systemctl stop [email protected]".
Otherwise systemd and ifup get out of sync,
which is what's causing the problem here.
It suggests a flaw in the way ifupdown is being used under systemd.
Consider how LSB scripts are handled.
"/etc/init.d/ifupdown restart" is actually rediected to systemctl,
thanks to magic in /lib/lsb/init-functions.
Could ifup do the same?
Somehow, it would need to detect whether it's being run directly from
the [email protected] file or not...
== Steps to reproduce: ==
0. Install the systemd package.
systemd is a replacement init system.
Make sure you know how to recover, IN CASE IT BREAKS YOUR DEBIAN.
1. Configure a working wired network iterface using ifupdown.
(I'm actually using wireless, but then you have to deal with the encryption).
By default, NetworkManager overrides it.
You can probably just remove "#NetworkManager#"
from the start of the line in /etc/network/interfaces.
It will then look something like
iface eth0 inet dhcp
Make sure there's an "allow-hotplug eth0" line for it as well
(it should already be there).
NetworkManager will no longer manage your network interface.
ifupdown will manage it instead.
2. Reboot (after making sure your ethernet cable is plugged in)
== Expected behaviour: networking still works ==
The network interface is configured on startup by ifupdown,
and you should have working internet access.
You can check ifupdown is being used by running "ifdown eth0; ifup eth0".
ifdown only works when the interface is being managed with ifup.
3. Hot-remove and re-add the network interface
(the device, not the cable).
I use an ASUS EeePC 701 which has unusual hotpluggable wifi.
Probably the eaiest way to emulate this is
"rmmod atl2; modprobe atl2", where "atl2" is the name of
the driver for your network interface.
== Expected behaviour: working hotplug ==
- when removed, udev rules run "ifdown eth0" to clean up.
- when added, udev rules run "ifup eth0" to configure it.
== Actual behaviour: hotplug doesn't work ==
When systemd is installed, the "ifup" is done through a systemd
service. You can see this with "systemctl status [email protected]",
and it's pretty cool.
But the "ifdown" isn't done through systemd :(.
That means systemd doesn't see the removal event.
As far as it's concerned, the service is still active.
When the interface is re-added, systemd is asked to start
the corresponding service. But the service is already
active, so there's nothing for it to do.
The interface is left un-configured.
-- Extra package info:
ii ifupdown 0.7~beta2 high level tools to configure network interf
(which is an upgrade from experimental, in case that fixed it)
ii systemd 37-1 system and service manager
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages udev depends on:
ii debconf [debconf-2.0] 1.5.41
ii libc6 2.13-26
ii libselinux1 2.1.0-4.1
ii libudev0 175-3.1
ii lsb-base 3.2-28.1
ii util-linux 2.20.1-1.2
Versions of packages udev recommends:
ii pciutils 1:3.1.8-2
ii usbutils 1:005-2
udev suggests no packages.
-- debconf information:
udev/new_kernel_needed: false
udev/title/upgrade:
udev/reboot_needed:
udev/sysfs_deprecated_incompatibility:
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]