Bug#837759: network configuration stops working reliably
Felipe Sateler
fsateler at debian.org
Sat Sep 17 17:51:28 BST 2016
On 15 September 2016 at 12:36, Felipe Sateler <fsateler at debian.org> wrote:
> On 14 September 2016 at 18:34, Wolfgang Walter <wolfgang.walter at stwm.de> wrote:
>> On Wednesday, 14 September 2016 10:00:28 CEST Felipe Sateler wrote:
>>> Control: tags -1 moreinfo
>>>
>>> On 14 September 2016 at 06:59, Wolfgang Walter <wolfgang.walter at stwm.de> wrote:
>>> > Package: systemd
>>> > Version: 231-6
>>> > Severity: grave
>>> >
>>> > Starting with version 231-6 the configuration of network interfaces stops
>>> > working reliably when rebooting a system. Downgrading to 231-5 fixes the
>>> > problem.
>>> >
>>> > Symptoms: If a network interface is configured using
>>> > /etc/network/interfaces it seems that systemd now sometimes removes the
>>> > configured ip4 and/or ipv6 addresses in the boot process. It also seems
>>> > to remove routes of network interfaces configured manually or with
>>> > /etc/network/interfaces if the link state changes.
>>> >
>>> > This seems not only be the case with interfaces configured via
>>> > /etc/network/ interfaces but with any interface one creates and assigns
>>> > ip addresses manually.
>>> >
>>> > I tested this with a script:
>>> >
>>> > #!/bin/sh
>>> > if [ "$1" = start ]; then
>>> > ip link del TEST >/dev/null 2>&1 || true
>>> > ip link add name TEST type dummy
>>> > ip -b - <<"EOF"
>>> > link set TEST up
>>> > addr add 10.10.10.10/32 dev TEST nodad
>>> > addr add 2a01:1:1:1::1/128 dev TEST nodad
>>> > addr add 2a01:1:1:1::2/128 dev TEST nodad
>>> > addr add 2a01:1:1:1::3/128 dev TEST nodad
>>> > addr add 2a01:1:1:1::4/128 dev TEST nodad
>>> > addr add 2a01:1:1:1::5/128 dev TEST nodad
>>> > EOF
>>> > ip addr ls TEST
>>> > sleep 2
>>> > elif [ "$1" = stop ]; then
>>> > ip addr flush dev TEST
>>> > ip link del TEST
>>> > fi
>>> >
>>> > which I start with as a systemd oneshot service with
>>> >
>>> > Before=systemd-networkd.service
>>> >
>>> > I can see in the journal that TEST has all adresses assigned but with
>>> > 231-6 it looses them again (probably when systemd-networkd.service
>>> > starts). With 231-5 or earlier this in not the case.
>>>
>>> It appears you are using systemd-networkd. Could you please attach
>>> your networkd configuration?
>>>
>>> Version 231-6 is built with iptables support, so that may be causing
>>> an interaction that was not visible before.
>>
>> I think this is the problem:
>>
>> https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=debian/231-6&id=79e10aaee1cdd412bd42f13f26e558ba1cd2196b
>>
>> I suppose is that the check for LINK_STATE_UNMANAGED may be racy.
>> The interface may go down and up before LINK_STATE_UNMANAGED is set.
>> Maybe the state is LINK_STATE_PENDING ?
>
> Interesting. Did you test with that patch disabled? (sorry, I have not
> had time to test).
BTW, I have tested manually on my system during runtime and cannot
reproduce. If this is a race maybe my laptop while idle managed to
configure faster than networkd managed to react.
--
Saludos,
Felipe Sateler
More information about the Pkg-systemd-maintainers
mailing list