Bug#771943: ifupdown: boot hangs, interface won't raise

2014-12-11 Thread Michael Biebl
Am 03.12.2014 um 21:37 schrieb Michael Biebl:
 As for the operstate check: I did remove this check, because even with a
 cable plugged in, I got down  when running cat
 /sys/class/net/eth0/operstate in my test VM, so /etc/init.d/networking
 never configured the interface, so this check proved to be not really
 reliable.
 
 Andrew, I guess what you want to do here is have some kind of link
 detection? Why is that part of the init script an not ifup itself?

I've been looking into this further and wanted to find out, why
/sys/class/net/eth0/operstate did not report the correct state in my
virtualbox VM.

For that I ran ip monitor and unplugged/plugged the cable, but nothing
did show up. Then it dawned to me, that I actually need to up the
interface first, before link detection works.

If I run
# ip link set eth0 up

Then ip link show or cat /sys/class/net/eth0/operstate reports the
correct link state.

Andrew, I guess if you want to put the operstate check back, you'll also
need to first up the interface via ip link set interface up.

Btw, is there a reason, that this check is only run for allow-hotplug
interfaces?

Armin, does a patch like the attached one fix the issue for you? I.e.,
if the cable is plugged, it correctly configures the network and does
nothing during boot if the cable is unplugged?

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/init.d/networking b/init.d/networking
index d98fe1a..cf16927 100755
--- a/init.d/networking
+++ b/init.d/networking
@@ -105,7 +105,9 @@ ifup_hotplug () {
 			do
 link=${iface##:*}
 link=${link##.*}
-if [ -e /sys/class/net/$link ]
+ip link set $iface up || true
+if [ -e /sys/class/net/$link ]  [ $(cat /sys/class/net/$link/oper
+state) = up ]
 then
 	echo $iface
 fi


signature.asc
Description: OpenPGP digital signature


Bug#771943: ifupdown: boot hangs, interface won't raise

2014-12-11 Thread Andrew Shadura
Hello,

On 11 December 2014 at 12:09, Michael Biebl bi...@debian.org wrote:
 For that I ran ip monitor and unplugged/plugged the cable, but nothing
 did show up. Then it dawned to me, that I actually need to up the
 interface first, before link detection works.

 If I run
 # ip link set eth0 up

 Then ip link show or cat /sys/class/net/eth0/operstate reports the
 correct link state.

Aha, I see. On my laptop, ifplugd keeps the interface link always up,
which why I would never notice this issue.

-- 
Cheers,
  Andrew


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#771943: ifupdown: boot hangs, interface won't raise

2014-12-11 Thread Nicolas Le Cam
Package: ifupdown
Version: 0.7.50
Followup-For: Bug #771943

Confirming.

networking.service blocks for more than 1min then return.

Network is accessible via wifi during this minute then gets down and I'm
forced to do a systemctl restart networking.service to get a 1min
network access again.

Reverting to 0.7.49 fixes the problem.

nlecam@misaki:~$ systemd-analyze blame | head -n1
1min 23.563s networking.service

regards,
Nicolas

-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (900, 'testing'), (600, 'testing'), (300, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.17.0-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (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.113+nmu3
ii  initscripts  2.88dsf-58
ii  iproute2 3.16.0-2
ii  libc62.19-13
ii  lsb-base 4.1+Debian13+nmu1

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.3.1-5

Versions of packages ifupdown suggests:
ii  net-tools  1.60-26+b1
ii  ppp2.4.6-3
pn  rdnssd none

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#771943: ifupdown: boot hangs, interface won't raise

2014-12-03 Thread Armin Haas
Package: ifupdown
Version: 0.7.50
Severity: important

Dear Maintainer,

With version 0.7.50, my netbook doesn't finish booting, when eth0 isn't
connected to the router. Instead it seems to wait with this message:

A start job is running for LSB: Raise network interfaces. (15min 10s / no limit)

(The 15min 10s part is of course where the time count increases)

Connecting eth0 to the router while this message is being displayed has no
effect (or I didn't wait long enough, just 1 min).

But when eth0 is connected to the router before boot starts, all works fine.

Reverting to version 0.7.49 from snapshots.debian.org solves the problem and
boot works with and without eth0 being connected to the router.

Cheers

Armin

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (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.113+nmu3
ii  initscripts  2.88dsf-58
ii  iproute2 3.16.0-2
ii  libc62.19-13
ii  lsb-base 4.1+Debian13+nmu1

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.3.1-5

Versions of packages ifupdown suggests:
ii  net-tools  1.60-26+b1
pn  pppnone
pn  rdnssd none

-- no debconf information


signature.asc
Description: Digital signature


Bug#771943: ifupdown: boot hangs, interface won't raise

2014-12-03 Thread Andrew Shadura
Armin,

Could you please post your config?

-- 
Cheers,
  Andrew


Bug#771943: ifupdown: boot hangs, interface won't raise

2014-12-03 Thread Armin Haas
Sorry for not including it right away, here is my /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

# The primary network interface
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug eth0
iface eth0 inet dhcp


There is no NetworkManager (or wicd, ...) involved.

Cheers

Armin


signature.asc
Description: Digital signature


Bug#771943: ifupdown: boot hangs, interface won't raise

2014-12-03 Thread Andrew Shadura
Armin,

I suspect it may be related to operstate check in the init script. Please
compare init scripts of those two versions and try to use the line from .49
and see if it helps.

-- 
Cheers,
  Andrew


Bug#771943: ifupdown: boot hangs, interface won't raise

2014-12-03 Thread Michael Biebl
On Wed, 3 Dec 2014 17:59:29 +0100 Armin Haas ar...@awawa.de wrote:
 Package: ifupdown
 Version: 0.7.50
 Severity: important
 
 Dear Maintainer,
 
 With version 0.7.50, my netbook doesn't finish booting, when eth0 isn't
 connected to the router. Instead it seems to wait with this message:
 
 A start job is running for LSB: Raise network interfaces. (15min 10s / no 
 limit)
 
 (The 15min 10s part is of course where the time count increases)
 
 Connecting eth0 to the router while this message is being displayed has no
 effect (or I didn't wait long enough, just 1 min).

Could you please try and wait a bit longer?

 But when eth0 is connected to the router before boot starts, all works fine.
 
 Reverting to version 0.7.49 from snapshots.debian.org solves the problem and
 boot works with and without eth0 being connected to the router.

With 0.7.49, allow-hotplug interfaces were handled by udev and started
in the background, not blocking the boot process. This had the downside,
that services which depend on $network didn't work properly.

I suspect, that it's simply dhclient trying to get a lease and you
simply need to wait for it to time out.

If you add systemd.debug-shell to the kernel command line (man 7
kernel-command-line), you can switch to a root shell on vt9 during boot
and inspect the system.

The output of ps aux, journalctl -alb and systemctl list-jobs
might be helpful.


As for the operstate check: I did remove this check, because even with a
cable plugged in, I got down  when running cat
/sys/class/net/eth0/operstate in my test VM, so /etc/init.d/networking
never configured the interface, so this check proved to be not really
reliable.

Andrew, I guess what you want to do here is have some kind of link
detection? Why is that part of the init script an not ifup itself?


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature