Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev-171-r6 not populating nics in 70-persistent-net[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 587
Location: Texas

PostPosted: Wed Sep 19, 2012 10:26 pm    Post subject: udev-171-r6 not populating nics in 70-persistent-net[SOLVED] Reply with quote

I am not seeing my nics show up in /etc/udev/rules.d/70-persistent-net.rules

when I run /lib/udev/write_net_rules I get "missing $INTERFACE"

checked bugzilla, no luck

udevadm info -a -p /sys/class/net/eth0 (as well as eth1,eth2,eth3,eth4 all show up. its a 5 nic box acting as a simple router in a vm environment)

what is happening is the mac addresses are changing on the interfaces. I thought I could use persistent rules to make them stay correct, but they are not there. I did a little research and appearently some people are finding a change in recent udev has caused this. My eth0 does come up first and gets configured correctly. Its likely several others have this issue and don't know it. kernel sees the nics. if I change /etc/conf.d/net and change my config to use the correct eth1,2,3,4 networks come back up. But, I need to get this to stick in case of reboot.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.


Last edited by njcwotx on Fri Sep 21, 2012 7:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 587
Location: Texas

PostPosted: Thu Sep 20, 2012 8:49 pm    Post subject: Reply with quote

its a vm so I changed virtual nics to e1000 and no luck

I updated udev to 189 using the ~x86 keyword, still no luck.

I tried manually setting nic renames but no luck.

70-persistent-net.rules is not being created.

Anyone notice this?

Also, in 189. /lib/udev/write_net_rules script is no longer there!
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Sep 21, 2012 1:06 am    Post subject: Reply with quote

njcwotx ...

For udev-171-r6 see bug 225033, the postinst states: "persistent-net does assigning fixed names to network devices. If you have problems with the persistent-net rules, just delete the rules file [...] and then reboot. This may however number your devices in a different way than they are now."

For udev-189 the persistent-net rules generator has been removed upstream, postinst states: "Upstream has removed the persistent-net and persistent-cd rules generator. If you need persistent names for these devices, place udev rules for them in /etc/udev/rules.d. Be aware that you cannot directly swap device names, so persistent rules for network devices should be like the ones at the following URL".

Perhaps one or other of the bugs will be of help ...

best ... khay
Back to top
View user's profile Send private message
njcwotx
Guru
Guru


Joined: 25 Feb 2005
Posts: 587
Location: Texas

PostPosted: Fri Sep 21, 2012 7:01 pm    Post subject: Reply with quote

OK. I finally figured out why my rules are not being generated. I have never had to work with udev like this before so I can say that this old dog learned a new trick today.

First. Up to now, I knew that 70-persistent-net.rules enumerated nics. If there was a change, usually I went to this file removed the entry and it would regenerate eth0 properly. That was about all I knew up to now.

Well, now I had to learn how this process of enumeration takes place.

The issue started when I added multiple nics to create a virtual router. The nics were not getting populated in /etc/udev/rules.d/70-persistent-net.rules and my eth* interfaces were moving around. If I deleted the file and rebooted, I just didnt get the file. With some research, I played with variations of the "udevadm" command. That one is certainly a rabbit hole of linux mojo, there are many ways to use it, and most of it is still an enigma. I will have to look further into this one.

I came across a file /lib/udev/write_net_rules and tried to run it and got "missing $INTERFACE". Poking through the script and research, I realized its auto called and used /lib/udev/rule_generator.functions and /lib/udev/rules.d/75-persistent-net-generator.rules. It took me a while and several browsings of these files to make some sense of what they did.

write_net_rules appears to be the script to generate the file.
rule_generator.functions is more functions for the script to use.
75-persistent-net-generator.rules is used to control some variables in the script and make things happen.

Inside the 75-persistent-net-generator.rules is several lines similar to....
ENV{MATCHADDR}=="aa:bb:cc:*", GOTO="globally_administered_whitelist"

well this line basically says skip over these mac addresses and bypass generation. Since I was using vmware vms in ESX, I found my mac address inside one of these rules. So, in the end, the script would find the mac of my vmware nic and decide to ignore it. Thus, from the scripts perspective, I have no nics! I commended out the line that removed vmware nics from consideration and voila, I rebooted and now I see my nics getting enumerated.
_________________
Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum