Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-20 Thread Rick Thomas

On Aug 17, 2016, at 12:09 AM, Guus Sliepen  wrote:

> What you then have to do is clean up after the
> kernel, by adding the following to /etc/network/interfaces:
> 
>   pre-up ip -6 a flush dev $IFACE mngtmpaddr
> 
> You can add this to either the inet or inet6 stanza.

Tried it.  This works as advertised.  Thanks!

Rick



Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-17 Thread Guus Sliepen
On Tue, Aug 16, 2016 at 11:50:33PM -0700, Rick Thomas wrote:

> It may be worth noting that after “updateinitramfs -u” I don’t see 
> /etc/sysctl.conf in the new initrd file:
> 
> > root@sheeva:~# lsinitramfs -l /boot/initrd.img | grep sysctl
> > -rwxr-xr-x 205 root root0 Apr 17 15:03 sbin/sysctl
> 
> So if the kernel is picking up the RA before switching out of the initrd, 
> there’s no way for it to know that it should not be doing that…   /-:

Yes, that's unfortunate. What you then have to do is clean up after the
kernel, by adding the following to /etc/network/interfaces:

pre-up ip -6 a flush dev $IFACE mngtmpaddr

You can add this to either the inet or inet6 stanza.

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: Digital signature


Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-16 Thread Rick Thomas

It may be worth noting that after “updateinitramfs -u” I don’t see 
/etc/sysctl.conf in the new initrd file:

> root@sheeva:~# lsinitramfs -l /boot/initrd.img | grep sysctl
> -rwxr-xr-x 205 root root0 Apr 17 15:03 sbin/sysctl


So if the kernel is picking up the RA before switching out of the initrd, 
there’s no way for it to know that it should not be doing that…   /-:

Rick


Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-16 Thread Rick Thomas

On Aug 16, 2016, at 4:51 PM, Guus Sliepen  wrote:

> On Tue, Aug 16, 2016 at 03:56:56PM -0700, Rick Thomas wrote:
> 
>>> Another option is to add the following line to /etc/systl.conf:
>>> 
>>>  net.ipv6.conf.all.accept_ra=0
>> 
>> Do I understand correctly that I should use this if I want to assign a 
>> static IPv6 address that is *not* the same as the RA would hand out 
>> dynamically?  I have a couple of machines where that would apply, if true.
> 
> If you want to assign a different address then ifupdown will not
> conflict with the autoconfigured one, so in that case it is not
> necessary,

That works.  And no “failed” messages about bringing up networking.  As 
predicted, I have two IPv6 addresses, one the static address from 
/etc/network/interfaces and one assigned dynamically.

> but if you don't disable accept_ra you will end up with two
> addresses configured.

However, when I added …accept_ra=0 to /etc/sysctl.conf and ran 
“update-initramfs -u” then rebooted, I still have two IPv6 addresses.

> root@sheeva:~# sysctl net.ipv6.conf.all.accept_ra
> net.ipv6.conf.all.accept_ra = 0


> root@sheeva:~# ip -6 addr
> 1: lo:  mtu 65536 state UNKNOWN qlen 1
> inet6 ::1/128 scope host 
>valid_lft forever preferred_lft forever
> 2: eth0:  mtu 1500 state UP qlen 1000
> inet6 2001:1234:2d2:1::111/64 scope global 
>valid_lft forever preferred_lft forever
> inet6 2001:1234:2d2:1:f2ad:4eff:fe00:3077/64 scope global mngtmpaddr 
> dynamic 
>valid_lft 85561sec preferred_lft 13561sec
> inet6 fe80::f2ad:4eff:fe00:3077/64 scope link 
>valid_lft forever preferred_lft forever

Any thoughts?  Have I misunderstood something?

Thanks!
Rick



Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-16 Thread Guus Sliepen
On Tue, Aug 16, 2016 at 03:56:56PM -0700, Rick Thomas wrote:

> > Another option is to add the following line to /etc/systl.conf:
> > 
> >   net.ipv6.conf.all.accept_ra=0
> 
> Do I understand correctly that I should use this if I want to assign a static 
> IPv6 address that is *not* the same as the RA would hand out dynamically?  I 
> have a couple of machines where that would apply, if true.

If you want to assign a different address then ifupdown will not
conflict with the autoconfigured one, so in that case it is not
necessary, but if you don't disable accept_ra you will end up with two
addresses configured.

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: Digital signature


Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-16 Thread Rick Thomas

> On Aug 16, 2016, at 1:57 PM, Guus Sliepen  wrote:
> 
> On Tue, Aug 16, 2016 at 01:07:15PM -0700, Rick Thomas wrote:
> 
>> Thanks Pascal!
> 
> Indeed thanks, now I have less explaining to do :)

And thank you Guus :)  Now I understand a lot more than I did.

> Another option is to add the following line to /etc/systl.conf:
> 
>   net.ipv6.conf.all.accept_ra=0

Do I understand correctly that I should use this if I want to assign a static 
IPv6 address that is *not* the same as the RA would hand out dynamically?  I 
have a couple of machines where that would apply, if true.

Thanks for all the help!
Rick


Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-16 Thread Guus Sliepen
On Tue, Aug 16, 2016 at 01:07:15PM -0700, Rick Thomas wrote:

> Thanks Pascal!

Indeed thanks, now I have less explaining to do :)

> >> Aug 14 17:02:41 sheeva systemd[1]: Starting Raise network interfaces...
> >> Aug 14 17:02:46 sheeva ifup[893]: /sbin/ifup: waiting for lock on 
> >> /run/network/ifstate.eth0
> >> Aug 14 17:02:49 sheeva ifup[893]: RTNETLINK answers: File exists
> > 
> > "RTNETLINK answers: File exists" typically happens when you try to add an 
> > address or a route which is already exists with "ip", which is the tool 
> > used internally by ifup.

Correct. And when any error occurs, ifup thinks that it failed to bring
the interface up properly.

> >> # The primary network interface
> >> allow-hotplug eth0
> >> iface eth0 inet static
> >>address 192.168.3.111
> >>netmask 255.255.240.000
> >>network 192.168.0.0
> >>broadcast 192.168.15.255
> >>gateway 192.168.1.1
> > 
> > Note that the network and broadcast options are not required. If missing, 
> > they will be calculated from the address and net mask values.
> 
> Thanks.  I’ll keep that in mind for next time.  No harm in leaving them in 
> though, right?

It's fine to leave them. But next time you write an
/etc/network/interfaces file, you can save yourself some typing: you
only need the address and gateway statements:

iface eth0 inet static
address 192.168.3.111/20
gateway 192.168.1.1

> >> iface eth0 inet6 static
> >>   address 2001:1234:2d2:1:f2ad:4eff:fe00:3077
> >>   netmask 64
> > 
> > This IPv6 address looks like an autoconfigured address calculated from the 
> > MAC address. You should not statically assign this kind of address.

Good catch!

> Why do you say that I should not statically assign this kind of address?  As 
> long as it’s the same as it would be getting dynamically, is there any harm? 
> (other than the one we’re observing here?)

If you have a DHCP daemon or RADVD running on your network, you
generally want to use what they provide instead of hardcoding your IP
addresses. Just think of the situation where you change your IPv6
provider and you get a new prefix: if you just use autoconfiguration,
you don't have to edit your /etc/network/interface files.

> It seems that it is getting a dynamic address from the RA (Yes, it’s the same 
> address as I am statically assigning.)  Prior to the most recent Sid update, 
> it did not get a dynamic address.  Is that a bug?  If so, is the bug in the 
> previous behavior or the current behavior?  can someone explain what the 
> purpose of the change was?

It could be that the kernel is behaving differently with the update;
maybe it did IPv6 autoconfiguration slower before, so ifupdown could
still add the address.

Unfortunately it is the case that the Linux kernel is doing IPv6 configuration
on its own. With IPv4, everything was done by userspace. The BSDs
require you to start "rtsold" which is basically a client version of
radvd. You can tell the kernel not to accept route advertisements by
adding the option "accept_ra 0" to the inet6 stanza in
/etc/network/interfaces, but unfortunately that does not always work
because the kernel might already have gotten an address by the time
ifupdown is run at boot. Another option is to add the followning line to
/etc/systl.conf:

net.ipv6.conf.all.accept_ra=0

But in your case, I'd follow Pascal's recommendation and just not
configure the IPv6 part statically.

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: Digital signature


Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-16 Thread Rick Thomas
Thanks Pascal!

On Aug 16, 2016, at 12:59 AM, Pascal Hambourg  wrote:

> Le 16/08/2016 à 09:03, Rick Thomas a écrit :
>> 
>> Aug 14 17:02:41 sheeva systemd[1]: Starting Raise network interfaces...
>> Aug 14 17:02:46 sheeva ifup[893]: /sbin/ifup: waiting for lock on 
>> /run/network/ifstate.eth0
>> Aug 14 17:02:49 sheeva ifup[893]: RTNETLINK answers: File exists
> 
> "RTNETLINK answers: File exists" typically happens when you try to add an 
> address or a route which is already exists with "ip", which is the tool used 
> internally by ifup.
> 
>> However the interface *is* up:
> 
> Yes but the configuration may not be complete.

It happens that it is complete, but I understand that it might not be.

> 
>> - /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 eth0
>> iface lo inet loopback
>> 
>> # The primary network interface
>> allow-hotplug eth0
>> iface eth0 inet static
>>  address 192.168.3.111
>>  netmask 255.255.240.000
>>  network 192.168.0.0
>>  broadcast 192.168.15.255
>>  gateway 192.168.1.1
> 
> Note that the network and broadcast options are not required. If missing, 
> they will be calculated from the address and net mask values.

Thanks.  I’ll keep that in mind for next time.  No harm in leaving them in 
though, right?

> 
>> iface eth0 inet6 static
>>   address 2001:1234:2d2:1:f2ad:4eff:fe00:3077
>>   netmask 64
> 
> This IPv6 address looks like an autoconfigured address calculated from the 
> MAC address. You should not statically assign this kind of address.

You are correct.  I assumed that when the IPv4 address needed to be static, the 
same was true for the IPv6 address as well.  I further assumed that declaring 
it to be inet6 static would prevent it from getting any address from the RA.  
Apparently not.

Why do you say that I should not statically assign this kind of address?  As 
long as it’s the same as it would be getting dynamically, is there any harm? 
(other than the one we’re observing here?)

> 
> If a router in your network sends IPv6 Router Advertisements (RA) with the 
> prefix 2001:1234:2d2:1::/64, then the kernel may autoconfigure the same 
> address, so this could be the duplicate.
> 
> “ip -6 addr" shows whether an IPv6 address was statically or dynamically 
> assigned.

It seems that it is getting a dynamic address from the RA (Yes, it’s the same 
address as I am statically assigning.)  Prior to the most recent Sid update, it 
did not get a dynamic address.  Is that a bug?  If so, is the bug in the 
previous behavior or the current behavior?  can someone explain what the 
purpose of the change was?

In any case, I commented out the inet6 stanza and now it boots without error.  
Also, IPv6 gets configured OK (dynamically).  

> 
> Note for Hans : the network and broadcast addresses are consistent with the 
> netmask.
> 

Yes, for historical reasons I have machines on this LAN whose IPv4 addresses 
have 3rd octets in the range 0-15.  The RFC1918 (192.168.xx.xx) address range 
is a true class B ( or “/16”, if you prefer cider notation) and it can be 
carved up any way you want.  It’s often used as a bunch of class Cs ( or 
“/24”s) but that’s not mandatory.

Rick

PS: I’d like to leave this bug open until we can be sure we understand the 
reason that the behavior changed.  This may be a hint that points to a timing 
glitch in the way systemd configures network interfaces that could cause more 
serious problems down the road.



Bug#834376: ifupdown: boot console says 'Failed to start Raise network interfaces' yet interface is up

2016-08-14 Thread Rick Thomas
Package: ifupdown
Version: 0.8.13
Severity: normal

Dear Maintainer,

Updated to latest debian Sid
See attached screenlog of boot. note error message quoted in subject line

After boot is completed we see:

  rbthomas@sheeva:~$ systemctl status networking.service
  * networking.service - Raise network interfaces
 Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor 
preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
 `-50-insserv.conf-$network.conf
 Active: failed (Result: exit-code) since Sun 2016-08-14 17:02:50 PDT; 
39min ago
 Docs: man:interfaces(5)
   Main PID: 893 (code=exited, status=1/FAILURE)

  Aug 14 17:02:41 sheeva systemd[1]: Starting Raise network interfaces...
  Aug 14 17:02:46 sheeva ifup[893]: /sbin/ifup: waiting for lock on 
/run/network/ifstate.eth0
  Aug 14 17:02:49 sheeva ifup[893]: RTNETLINK answers: File exists
  Aug 14 17:02:49 sheeva ifup[893]: Failed to bring up eth0.
  Aug 14 17:02:50 sheeva systemd[1]: networking.service: Main process exited, 
code=exited, status=1/FAILURE
  Aug 14 17:02:50 sheeva systemd[1]: Failed to start Raise network interfaces.
  Aug 14 17:02:50 sheeva systemd[1]: networking.service: Unit entered failed 
state.
  Aug 14 17:02:50 sheeva systemd[1]: networking.service: Failed with result 
'exit-code'.

However the interface *is* up:

  rbthomas@sheeva:~$ /sbin/ifconfig
  eth0: flags=4163  mtu 1500
inet 192.168.3.111  netmask 255.255.240.0  broadcast 192.168.15.255
inet6 2001:4978:2d2:1:f2ad:4eff:fe00:3077  prefixlen 64  scopeid 
0x0
inet6 fe80::f2ad:4eff:fe00:3077  prefixlen 64  scopeid 0x20
ether f0:ad:4e:00:30:77  txqueuelen 1000  (Ethernet)
RX packets 6897  bytes 738138 (720.8 KiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 4556  bytes 427016 (417.0 KiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 85  

  lo: flags=73  mtu 65536
inet 127.0.0.1  netmask 255.0.0.0
inet6 ::1  prefixlen 128  scopeid 0x10
loop  txqueuelen 1  (Local Loopback)
RX packets 2  bytes 98 (98.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 2  bytes 98 (98.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


Here is a possibly relevant config file

- /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 eth0
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.3.111
netmask 255.255.240.000
network 192.168.0.0
broadcast 192.168.15.255
gateway 192.168.1.1

iface eth0 inet6 static
address 2001:4978:2d2:1:f2ad:4eff:fe00:3077
netmask 64
- /etc/network/interfaces 




-- System Information:
Debian Release: stretch/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental')
Architecture: armel (armv5tel)

Kernel: Linux 4.6.0-1-marvell
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ifupdown depends on:
ii  adduser  3.115
ii  init-system-helpers  1.42
ii  iproute2 4.6.0-2
ii  libc62.23-4
ii  lsb-base 9.20160629

Versions of packages ifupdown recommends:
ii  isc-dhcp-client [dhcp-client]  4.3.4-1

Versions of packages ifupdown suggests:
pn  ppp 
pn  rdnssd  

-- no debconf information


screenlog.xz
Description: application/xz