[SOLVED ]update wrecked networking: udev rules being ignored

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED ]update wrecked networking: udev rules being ignored

Postby jiml8 » Jun 20th, '20, 23:50

When linux made the switch to the new interface naming scheme that was supposed to be somehow better than what we had before, I wrote some udev rules to keep my interfaces at eth0 eth1 and eth2 so that all my scripts would not break.

Well, that has been fine for a long time. Until now.

Now, I just did an update to kernel 5.6.14-desktop-2.mga7 and my networking is broken; the udev rules are apparently being ignored.

My interface names, eth0, eth1, and eth2, are being kept, but the match to MAC addresses is being ignored. What should be eth2 is now eth0. What should be eth0 is now eth1, and what should be eth1 is now eth2.

Well, I suppose that I could swap the cables around on the back of my box, but I am not going to do that. Also, because networking is totally down on the workstation and I am using my laptop for this message, I cannot easily pull samples of messages and such to put them in this post.

Does anyone here know what has changed in the latest update that would do this to me?

Once upon a time, Linux was fully controllable and predictable. These days, it is getting harder and harder to keep under control...
Last edited by jiml8 on Jul 23rd, '20, 06:48, edited 2 times in total.
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09

Re: update wrecked networking: udev rules being ignored

Postby jiml8 » Jun 21st, '20, 00:05

I did get this working using ifrename and manually reassigning the interface names. I hope it persists across a reboot. But if not, then I still have the problem
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09

Re: update wrecked networking: udev rules being ignored

Postby doktor5000 » Jun 21st, '20, 01:07

Did you also use net.ifnames=0 as kernel boot option, or only custom udev rules for the renaming ?
https://www.freedesktop.org/wiki/Softwa ... faceNames/
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16233
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: update wrecked networking: udev rules being ignored

Postby jiml8 » Jun 21st, '20, 23:49

That is a very useful link. I have bookmarked it.

No, I have never set a kernel command line option for this; up until now the udev rules have worked fine on their own.

I have set the command line option now, though I am considering doing it the "modern" way and creating /etc/systemd/network and populating it as specified.

But, most likely, the command line option will solve my problem.
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09

Re: update wrecked networking: udev rules being ignored

Postby jiml8 » Jul 12th, '20, 18:52

...and, the kernel command line option did not solve my problem. I just rebooted the system, my interfaces came up scrambled, and it took about half an hour to straighten out the interfaces, the vlan, and the routing.

So, now I have created the directory /etc/systemd/network and linked
Code: Select all
ln -s /dev/null /etc/systemd/network/99-default.link

Next time I reboot, I will see if this keeps my interfaces unchanged.
Last edited by jiml8 on Jul 23rd, '20, 06:45, edited 1 time in total.
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09

Re: update wrecked networking: udev rules being ignored

Postby jiml8 » Jul 23rd, '20, 06:44

Over this past weekend, I deployed a new virtual machine on my workstation.

Unlike almost all other deploys, this one caused problems and crashed the host a number of times. I therefore found myself rebooting a bunch of times over the day it took me to get control of that beast.

My network interfaces stayed the way I wanted them on every boot. So, it looks like this problem is solved.

I also got the VM sorted out. So all is good.
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09

Re: [SOLVED ]update wrecked networking: udev rules being ign

Postby jiml8 » Sep 9th, '20, 04:31

This has become unfixed.

A couple of weeks ago I updated to 5.7.14-desktop-1.mga7, along with the other stuff that was in that update. When I rebooted, the interfaces came up scrambled and it took awhile to sort out.

A short time ago, my system crashed. I rebooted, and my interfaces came up scrambled. It took awhile to sort it out.

Checking the documentation (starting at the link Doktor provided earlier) says that page is now deprecated and has been superceded. So I went to the new page.

Now I have to figure it out again. And try - once again - to make that F***ed up systemd do what I want, not what IT wants.

This is pissing me off extremely. I am thinking about moving to a distro with sys-v on it so I don't have this reoccurring nightmare.
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09

Re: [SOLVED ]update wrecked networking: udev rules being ign

Postby jiml8 » Sep 10th, '20, 19:26

So, the "solution" I have now implemented, per the new document page, is to create files in /etc/systemd/network that are .link files, which presumably define my interfaces. I am sure that, if this works (I have not rebooted to see), it will last for one or two revisions of systemd before getting broken again.

The .link files look like this:
Code: Select all
cat /etc/systemd/network/10-eth0.link
[Match]
Path=pci-0000:0a:00.0-*

[Link]
Name=eth0
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09

Re: [SOLVED ]update wrecked networking: udev rules being ign

Postby jiml8 » Sep 28th, '20, 04:01

I had to reboot this morning. The interfaces came up correctly.

So, my most recent fix held. I am sure this will last for a revision or two of systemd before they break it again. But for now, I am good.
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09

Re: [SOLVED ]update wrecked networking: udev rules being ign

Postby doktor5000 » Sep 28th, '20, 17:11

So this is basically the same as earlier in /etc/udev/rules.d/70-persistent-net.rules but in a different syntax ?
It's not like the old solution is something that could be easily read in a backwards-compatible way ... no, that would be too easy *sigh* :|
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16233
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED ]update wrecked networking: udev rules being ign

Postby jiml8 » Oct 4th, '20, 07:30

doktor5000 wrote:So this is basically the same as earlier in /etc/udev/rules.d/70-persistent-net.rules but in a different syntax ?

Yeah, pretty much.
It's not like the old solution is something that could be easily read in a backwards-compatible way ... no, that would be too easy *sigh* :|

We don' need no steeeenkeeng backward compatibility! Make the user sweat!
jiml8
 
Posts: 1148
Joined: Jul 7th, '13, 18:09


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest