Bug#917128: udev 240 breaks network interface naming

2020-10-30 Thread Matt Taggart
I am seeing this bug on buster, currently udev 241-7~deb10u4. Somehow I 
wound up with /etc/systemd/network/*.link files that I did not create 
(maybe a postinst migration script did?).


To get my old working config working again I did:
* rm /etc/systemd/network/*
* rm /etc/udev/rules.d/70-*
* add net.ifnames=0 to cmdline

and now I'm not getting the renamed interfaces and my vlans work as they 
did in stretch.


It would be nice if this could be fixed in buster.

Also...
I'd be willing to move to the new systemd way of setting up vlans, but I 
can't find a good tutorial of how to do so in Debian. The best docs I've 
found so far was this Arch wiki link


https://wiki.archlinux.org/index.php/VLAN

but that seems like maybe it's more complicated than it needs to be. So 
this is also a wishlist for better docs of the "right" way to be doing 
this in buster and newer.


Thanks,

--
Matt Taggart
tagg...@debian.org



Bug#917128: udev 240 breaks network interface naming

2020-01-31 Thread Michael Biebl
Is this still reproducible with v244?
In case you are using stable, there is a v244 backport for buster available.

On Fri, 24 Jan 2020 21:23:17 -0500 Dragan Tubic 
wrote:
> I have the same problem
> 
>  Failed to rename network interface 2 from 'enxXXX to 'wan':
> Device or resource busy
> 
> I noticed the following line in the journal that before udevd fails,
> 
>  systemd-networkd[293]: enxXXX : IPv6 successfully enabled
> 
> so I tried to disable ipv6 in
>  /etc/sysctl.conf
> by setting
> 
> net.ipv6.conf.all.disable_ipv6 = 1
> 
> net.ipv6.conf.default.disable_ipv6 = 1
> 
> net.ipv6.conf.lo.disable_ipv6 = 1
> 
> which after rebooting solved the problem. Not sure if I stumbled upon
> the right solution but I hope it helps.
> 
> 



signature.asc
Description: OpenPGP digital signature


Bug#917128: udev 240 breaks network interface naming

2020-01-24 Thread Dragan Tubic
I have the same problem

 Failed to rename network interface 2 from 'enxXXX to 'wan':
Device or resource busy

I noticed the following line in the journal that before udevd fails,

 systemd-networkd[293]: enxXXX : IPv6 successfully enabled

so I tried to disable ipv6 in
 /etc/sysctl.conf
by setting

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

which after rebooting solved the problem. Not sure if I stumbled upon
the right solution but I hope it helps.



Bug#917128: udev 240 breaks network interface naming

2019-01-24 Thread Emmanuel DECAEN
Hello,

It looks like, I have the same problem and it is still present in 240-4.
For more detail :
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917128#40

Regards,
-- 
Emmanuel DECAEN




Bug#917128: udev 240 breaks network interface naming

2019-01-18 Thread Michael Prokop
* Wolfgang Walter [Fri Jan 18, 2019 at 11:56:28AM +0100]:
> On Fri, 11 Jan 2019 17:44:48 +0100 Michael Biebl  wrote:
> > On Wed, 9 Jan 2019 22:41:24 +0100 Michael Biebl  wrote:

> > > I've pulled this patch and applied it to 240-3.

> > As I'm pretty sure this is fixed in 240-3, I'm going to close the bug
> > report.
> > Please reopen if you still have problems.

> The renaming problem still exists.
[...]

Did you test/verify this with 240-4?

regards,
-mika-


signature.asc
Description: Digital signature


Bug#917128: udev 240 breaks network interface naming

2019-01-18 Thread Wolfgang Walter
On Fri, 11 Jan 2019 17:44:48 +0100 Michael Biebl  wrote:
> Version: 240-3
> 
> On Wed, 9 Jan 2019 22:41:24 +0100 Michael Biebl  wrote:
> > On Fri, 28 Dec 2018 15:24:03 +0100 Wolfgang Walter
> >  wrote:
> > > On Friday, 28 December 2018 15:05:06 CET Michael Biebl wrote:
> > > > On Sun, 23 Dec 2018 01:51:00 +0100 Wolfgang Walter
> > > > 
> > > >  wrote:
> > > > > systemd-networkd from 240-1 though crashes with
> > > > > 
> > > > >   Assertion 'IN_SET(link->state, LINK_STATE_CONFIGURING,
> > > > >   LINK_STATE_CONFIGURING, LINK_STATE_FAILED, LINK_STATE_LINGER)' 
failed at
> > > > >   ../src/network/network/networkd-link.c:934, function 
address_handler().
> > > > >   Aborting.
> > > > That error message looks a lot like
> > > > 
> > > > https://github.com/systemd/systemd/issues/11272
> > > > 
> > > > Would you mind testing the pull request at
> > > > https://github.com/systemd/systemd/pull/11274
> > > > 
> > > > If this fixes your problem, we can consider cherry-picking that fix.
> > > 
> > > Will do, but can't do it immediately as I'm not back till 2.1.2019
> > 
> > I've pulled this patch and applied it to 240-3.
> 
> 
> As I'm pretty sure this is fixed in 240-3, I'm going to close the bug
> report.
> Please reopen if you still have problems.
> 
> Regards,
> Michael
> 

The renaming problem still exists.

I tried to workaround it by changing 10-netint.link as follows:

10-netint.link:
[Match]
MACAddress=00:01:2e:77:a5:45
Name=eth*

[Link]
Name=netint
WakeOnLan=off


As the vlan interface is named kbs this should not match, but the physical 
interface which starts with eth0 should.

But the vlan interface still ist renamed to renameX and later udev wants to 
change its name into netint, so kbs matches.

The systemd-doku says:
"A link file is said to match a device if each of the entries in the 
"[Match]" section matches, or if the section is empty."


Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts



Bug#917128: udev 240 breaks network interface naming

2019-01-15 Thread Emmanuel DECAEN
Hello,

I've tried with 240-4, the VLAN problem is still present.

File /etc/systemd/network/00-xgbe1.link :
[Match]
MACAddress=00:50:56:96:0d:d7

[Link]
Name=xgbe1

File /etc/network/interfaces :
iface xgbe1.40 inet static
    address 192.168.40.218/24

$ sudo ifup xgbe1.40
Cannot find device "xgbe1.40"
ifup: failed to bring up xgbe1.40

$ sudo dmesg
[...]
[   56.261847] vmxnet3 :13:00.0 xgbe1: intr type 3, mode 0, 3
vectors allocated
[   56.263559] vmxnet3 :13:00.0 xgbe1: NIC Link is Up 1 Mbps
[   56.446638] 8021q: 802.1Q VLAN Support v1.8
[   56.446861] 8021q: adding VLAN 0 to HW filter on device xgbe1
[   56.449675] rename5: renamed from xgbe1.40

$ ip link
3: xgbe1:  mtu 1500 qdisc mq state UP
mode DEFAULT group default qlen 1000
    link/ether 00:50:56:96:0d:d7 brd ff:ff:ff:ff:ff:ff
5: rename5@xgbe1:  mtu 1500 qdisc noop state DOWN
mode DEFAULT group default qlen 1000
    link/ether 00:50:56:96:0d:d7 brd ff:ff:ff:ff:ff:ff

The device xgbe1.40 is created and renamed during ifup to "rename5@xgbe1".

If you think the problem is not the same as mentioned earlier, I can
open a new bug report.

Best regards.
-- *
*Emmanuel DECAEN




Bug#917128: udev 240 breaks network interface naming

2019-01-09 Thread Michael Biebl
On Fri, 28 Dec 2018 15:24:03 +0100 Wolfgang Walter
 wrote:
> On Friday, 28 December 2018 15:05:06 CET Michael Biebl wrote:
> > On Sun, 23 Dec 2018 01:51:00 +0100 Wolfgang Walter
> > 
> >  wrote:
> > > systemd-networkd from 240-1 though crashes with
> > > 
> > >   Assertion 'IN_SET(link->state, LINK_STATE_CONFIGURING,
> > >   LINK_STATE_CONFIGURING, LINK_STATE_FAILED, LINK_STATE_LINGER)' failed at
> > >   ../src/network/network/networkd-link.c:934, function address_handler().
> > >   Aborting.
> > That error message looks a lot like
> > 
> > https://github.com/systemd/systemd/issues/11272
> > 
> > Would you mind testing the pull request at
> > https://github.com/systemd/systemd/pull/11274
> > 
> > If this fixes your problem, we can consider cherry-picking that fix.
> 
> Will do, but can't do it immediately as I'm not back till 2.1.2019

I've pulled this patch and applied it to 240-3.
Would be great if you can test and confirm it fixes your issue.

-- 
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


Bug#917128: udev 240 breaks network interface naming

2018-12-28 Thread Wolfgang Walter
> On Sun, 23 Dec 2018 01:51:00 +0100 Wolfgang Walter
> 
>  wrote:
> > Package:  udev
> > Version: 240-1
> > Severity: important
> > 
> > After upgrading from 239-15 to 240-1 or higher my network setup breaks.
> > 
> > The breakage is similar to the last one I reported (bug #904198) though
> > different in detail.
> > 
> > This times all my vlan-devices on a physical device netint are first
> > renamed to renameX and than udev tries to rename them again but this time
> > it tries to give them all the name netint - which of course fails.
> > 
> > A setup like the following one should be able to reproduce this problem:
> > 
> > 10-netint.link:
> > [Match]
> > MACAddress=00:01:2e:77:a5:45
> > 
> > [Link]
> > Name=netint
> > WakeOnLan=off
> > 
> > 
> > netint.network:
> > [Match]
> > Name=netint
> > 
> > [Network]
> > VLAN=kbs
> > LinkLocalAddressing=no
> > DHCP=no
> > 
> > 
> > kbs.link
> > [NetDev]
> > Name=kbs
> > Kind=vlan
> > 
> > [VLAN]
> > Id=10
> > 
> > 
> > 
> > In the journal you should see something like
> > 
> > kernel: rename31: renamed from kbs
> > 
> > systemd-networkd[852]: kbs: Interface name change detected, kbs has been
> > renamed to rename31 
> > [347]: kbs: Failed to rename network interface 31 from 'kbs' to 'netint':
> > Device or resource busy 
> > 
> > 
> > 
> > Downgrading udev to 239-15 fixes it in principle that is this rename does
> > not happen.
> > 
> > systemd-networkd from 240-1 though crashes with
> > 
> > Assertion 'IN_SET(link->state, LINK_STATE_CONFIGURING,
> > LINK_STATE_CONFIGURING, LINK_STATE_FAILED, LINK_STATE_LINGER)' failed at
> > ../src/network/network/networkd-link.c:934, function address_handler().
> > Aborting.> > 
> > Therefor I also had to downgrade systemd back to 239-15.
> 
> Someone mentioned on IRC:
> 
>  hmm, 917128 actually comes pre-broken
>  the reporter is applying renaming based purely on MACAddress,
> and that's *already* a problem when VLANs are involved
>  because they all have the same MAC address as the underlying
> physical interface
>  (which I found out the hard way years ago, with just udev
> .rules too)
>  so the only change is that it was a race previously and a
> crash now

I can't believe that. Not only did it work since systemd is in debian without 
any problem, in older version including 239 I could add vlan netdev-devices 
later and they never were renamed.

There has something changed which causes that.

Maybe devices created by .netdev simply were excempted renamed as they already 
get there name by in the [NetDev]-section?

I also can't see a workaround as you cannot have a match which says "don't 
match netdev devices" or simething like that.

Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts



Bug#917128: udev 240 breaks network interface naming

2018-12-28 Thread Wolfgang Walter
On Friday, 28 December 2018 15:05:06 CET Michael Biebl wrote:
> On Sun, 23 Dec 2018 01:51:00 +0100 Wolfgang Walter
> 
>  wrote:
> > systemd-networkd from 240-1 though crashes with
> > 
> > Assertion 'IN_SET(link->state, LINK_STATE_CONFIGURING,
> > LINK_STATE_CONFIGURING, LINK_STATE_FAILED, LINK_STATE_LINGER)' failed at
> > ../src/network/network/networkd-link.c:934, function address_handler().
> > Aborting.
> That error message looks a lot like
> 
> https://github.com/systemd/systemd/issues/11272
> 
> Would you mind testing the pull request at
> https://github.com/systemd/systemd/pull/11274
> 
> If this fixes your problem, we can consider cherry-picking that fix.

Will do, but can't do it immediately as I'm not back till 2.1.2019

> 
> Regards,
> Michael

Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts



Bug#917128: udev 240 breaks network interface naming

2018-12-28 Thread Michael Biebl
On Sun, 23 Dec 2018 01:51:00 +0100 Wolfgang Walter
 wrote:

> systemd-networkd from 240-1 though crashes with
> 
>   Assertion 'IN_SET(link->state, LINK_STATE_CONFIGURING, 
> LINK_STATE_CONFIGURING, LINK_STATE_FAILED, LINK_STATE_LINGER)' failed at 
> ../src/network/network/networkd-link.c:934, function address_handler(). 
> Aborting.


That error message looks a lot like

https://github.com/systemd/systemd/issues/11272

Would you mind testing the pull request at
https://github.com/systemd/systemd/pull/11274

If this fixes your problem, we can consider cherry-picking that fix.

Regards,
Michael



signature.asc
Description: OpenPGP digital signature


Bug#917128: udev 240 breaks network interface naming

2018-12-28 Thread Michael Biebl

On Sun, 23 Dec 2018 01:51:00 +0100 Wolfgang Walter
 wrote:
> Package:  udev
> Version: 240-1
> Severity: important
> 
> After upgrading from 239-15 to 240-1 or higher my network setup breaks.
> 
> The breakage is similar to the last one I reported (bug #904198) though 
> different in detail.
> 
> This times all my vlan-devices on a physical device netint are first renamed 
> to renameX and than udev tries to rename them again but this time it tries to 
> give them all the name netint - which of course fails.
> 
> A setup like the following one should be able to reproduce this problem:
> 
> 10-netint.link:
> [Match]
> MACAddress=00:01:2e:77:a5:45
> 
> [Link]
> Name=netint
> WakeOnLan=off
> 
> 
> netint.network:
> [Match]
> Name=netint
> 
> [Network]
> VLAN=kbs
> LinkLocalAddressing=no
> DHCP=no
> 
> 
> kbs.link
> [NetDev]
> Name=kbs
> Kind=vlan
> 
> [VLAN]
> Id=10
> 
> 
> 
> In the journal you should see something like
> 
> kernel: rename31: renamed from kbs
> 
> systemd-networkd[852]: kbs: Interface name change detected, kbs has been 
> renamed to rename31
> 
> [347]: kbs: Failed to rename network interface 31 from 'kbs' to 'netint': 
> Device or resource busy
> 
> 
> 
> 
> Downgrading udev to 239-15 fixes it in principle that is this rename does not 
> happen.
> 
> systemd-networkd from 240-1 though crashes with
> 
>   Assertion 'IN_SET(link->state, LINK_STATE_CONFIGURING, 
> LINK_STATE_CONFIGURING, LINK_STATE_FAILED, LINK_STATE_LINGER)' failed at 
> ../src/network/network/networkd-link.c:934, function address_handler(). 
> Aborting.
> 
> Therefor I also had to downgrade systemd back to 239-15.
> 

Someone mentioned on IRC:

 hmm, 917128 actually comes pre-broken
 the reporter is applying renaming based purely on MACAddress,
and that's *already* a problem when VLANs are involved
 because they all have the same MAC address as the underlying
physical interface
 (which I found out the hard way years ago, with just udev
.rules too)
 so the only change is that it was a race previously and a
crash now



signature.asc
Description: OpenPGP digital signature


Bug#917128: udev 240 breaks network interface naming

2018-12-22 Thread Wolfgang Walter
Package:  udev
Version: 240-1
Severity: important

After upgrading from 239-15 to 240-1 or higher my network setup breaks.

The breakage is similar to the last one I reported (bug #904198) though 
different in detail.

This times all my vlan-devices on a physical device netint are first renamed to 
renameX and than udev tries to rename them again but this time it tries to give 
them all the name netint - which of course fails.

A setup like the following one should be able to reproduce this problem:

10-netint.link:
[Match]
MACAddress=00:01:2e:77:a5:45

[Link]
Name=netint
WakeOnLan=off


netint.network:
[Match]
Name=netint

[Network]
VLAN=kbs
LinkLocalAddressing=no
DHCP=no


kbs.link
[NetDev]
Name=kbs
Kind=vlan

[VLAN]
Id=10



In the journal you should see something like

kernel: rename31: renamed from kbs

systemd-networkd[852]: kbs: Interface name change detected, kbs has been 
renamed to rename31

[347]: kbs: Failed to rename network interface 31 from 'kbs' to 'netint': 
Device or resource busy




Downgrading udev to 239-15 fixes it in principle that is this rename does not 
happen.

systemd-networkd from 240-1 though crashes with

Assertion 'IN_SET(link->state, LINK_STATE_CONFIGURING, 
LINK_STATE_CONFIGURING, LINK_STATE_FAILED, LINK_STATE_LINGER)' failed at 
../src/network/network/networkd-link.c:934, function address_handler(). 
Aborting.

Therefor I also had to downgrade systemd back to 239-15.




Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts