FS#25308 - [archboot] some modules (network ones) are both in /etc/rc.conf and blacklisted ! using archboot

Attached to Project: Arch Linux
Opened by Frederic Bezies (fredbezies) - Friday, 29 July 2011, 13:19 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 17 August 2011, 06:26 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Tobias Powalowski (tpowa)
Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description: Hello.

Doing some tests with a qemu-kvm virtual PC and archlinux + testing I noticed that when I upgrade to linux 3.0 and related packages, I noticed that e1000 kernel module (which give network to qemu-kvm virtual PC) is both in MODULES and in /etc/modprobe.d/blacklist_net.conf

So, at boot time, it is both loaded and unloaded leading to a "Cannot find device eth0" message at boot.

Additional info:

linux 3.0-2

Steps to reproduce: Just upgrade to linux 3.0 using testing.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Wednesday, 17 August 2011, 06:26 GMT
Reason for closing:  Fixed
Comment by Ionut Biru (wonder) - Friday, 29 July 2011, 13:32 GMT
it exists in rc.conf and /etc/modprobe.d/blacklist_net.conf because you did it.

we don't have any package in repos that owns /etc/modprobe.d/blacklist_net.conf
Comment by Frederic Bezies (fredbezies) - Friday, 29 July 2011, 13:41 GMT
I only upgraded package. I didn't modify /etc/modprobe.d/blacklist_net.conf at all, besides commenting blacklist line.
Comment by Frederic Bezies (fredbezies) - Friday, 29 July 2011, 14:23 GMT
Weird that /etc/modprobe.d/blacklist_net.conf appears. I used last archboot linux ISO available and a net install. Does it come from here ?
Comment by Ionut Biru (wonder) - Friday, 29 July 2011, 14:24 GMT
Tobias must know
Comment by Frederic Bezies (fredbezies) - Friday, 29 July 2011, 14:31 GMT
I think so. Weird that file which appeared from "nowhere". Could not find it on my main archlinux installation (made back in september 2010).

Removing this file and network is working flawlessly or near that ;)
Comment by Tobias Powalowski (tpowa) - Friday, 29 July 2011, 17:55 GMT
This was added in last version, to keep persistent network names.
Blacklisting changed so this had to change too.
blacklist file keeps udev from loading.
rc.conf contains MODULES= which loads the network modules always in the same order.

Not a bug, it's a feature.
Comment by Frederic Bezies (fredbezies) - Saturday, 30 July 2011, 05:19 GMT
Thanks for the explanation, but it is a feature which could be a bug sometimes. I'm answering using my laptop, and I have to comment lines in /etc/modprobe.d/blacklist_net.conf to get a working network (wired and wireless one).

Have a good day.
Comment by Tobias Powalowski (tpowa) - Saturday, 30 July 2011, 06:11 GMT
Are you using netcfg?
If yes it could be that the interface is not up till netcfg is run.
Comment by Frederic Bezies (fredbezies) - Saturday, 30 July 2011, 06:13 GMT
If you mean using network daemon, in a first time yes. After that I'm using networkmanager (because of gnome 3).

Anyway, I need to comment blacklist content to install packages after I switched to testing.
Comment by Tobias Powalowski (tpowa) - Saturday, 30 July 2011, 06:19 GMT
I close this, but if more people will come up with this, I might remove that feature.
In your case I think it's a pure timing issue that the network interface is not ready at link speed when the helpers want to set the address.
Comment by Karol Błażewicz (karol) - Sunday, 31 July 2011, 07:52 GMT Comment by pajaro (pajaro) - Sunday, 31 July 2011, 07:52 GMT
  • Field changed: Percent Complete (100% → 0%)
After last update I lost network and audio. In the forums they pointed me to this bug.

All network and sound related drivers that I had in rc.conf now appear blacklisted in blacklist_net.conf and blacklist_sound.conf.

If it is not a bug, which is the new way of loading modules? I am expected to leave these automatically generated files untouched?

Thank you
Comment by Tobias Powalowski (tpowa) - Sunday, 31 July 2011, 18:44 GMT
Ok this issue is somehow related to initscripts/kernel 3.0 i'll ask Tom what changed that this is not working anymore.
Comment by Tom Gundersen (tomegun) - Sunday, 31 July 2011, 20:18 GMT
@tpowa:

This was caused by the move to the new blacklisting logic in initscripts/module-init-tools/udev. In particular by the patch: <http://projects.archlinux.org/initscripts.git/commit/?id=590ee44c1495ea67d05>.

Though the current behavior was intended, it would be simple enough to revert the functionality that causes this bug. Just colud just ignore blacklisting when we are loading MODULES from rc.conf. If possible, I would rather not though, as I find it a bit counter-intuitive to both force-load and blacklist a module.

It also seems like a fragile feature for a few reasons (off the top of my mind):
1) While the loading of MODULES is sequential at the moment, I don't think this is ever documented in modules-init-tools, so might, in principle, change.
2) What about systems where several nic's happen to use the same driver? I guess in that case this trick will not help to make sure we get persistent names.
3) By using a very Arch-specific solution, we risk that our usecase is not taken into account when various upstream projects evolve.

I believe writing udev rules to rename the devices would be the way to go. Maybe we could add a little tool that could do this for us? It should be something that the admin would call for each of the nic's he wants, in order to rename them, typically on install, and not something that is run automatically when a new nic appears (as was the case before). Such a thing would probably be welcome upstream, if anyone has the motivation to pursue it.

@Everyone: a workaround until we have sorted this out is to remove your *_blacklist.conf files. I hope we'll have this sorted out soon though. Sorry for inconveniencing everyone, as I was not aware of this use-case when I accepted the change.
Comment by Pierre Schmitz (Pierre) - Sunday, 31 July 2011, 22:52 GMT
You should really use udev here to achieve persistent naming. For network devices I'd go with matching the mac address. This keeps it persistent even if the driver changes. (e.g. switching from blob boradcom driver to staging opensource etc)

Create a file like /etc/udev/rules.d/10-network.rules with this content:

SUBSYSTEM=="net", ATTRS{address}=="00:aa:bb:cc:dd:01", NAME="lan0"
SUBSYSTEM=="net", ATTRS{address}=="00:aa:bb:cc:dd:02", NAME="lan1"

Naming is up to you. E.g I call my lan nic lan and wireless wlan.

For audio devices you may use this entry for modprobe.conf:

options snd slots=snd_virtuoso,snd_hda_intel

Comment by Tom Gundersen (tomegun) - Sunday, 31 July 2011, 22:56 GMT
Just to add to what Pierre wrote; in some weird cases a machine might have several nic's with the same MAC, in that case you'll have to add more details to the udev rules to distinguish them. I expect this to be extremely rare (though I have seen a bug report about it).
Comment by Tobias Powalowski (tpowa) - Monday, 01 August 2011, 11:09 GMT
Ok next release 2011.08 will not use the old method, i'll write something new for archboot.
Comment by Alen (Kosava) - Thursday, 04 August 2011, 11:01 GMT
I have this problem too, it not work sound and net... i instaled yesterday new archboot
Comment by Karol Błażewicz (karol) - Thursday, 04 August 2011, 11:09 GMT
@Alen (Kosava)
Have you removed the offending /etc/modprobe.d/* files? That should fix it.
Comment by dauerbaustelle (dauerbaustelle) - Thursday, 04 August 2011, 11:20 GMT
Merging #25396 into this issue,

/etc/modprobe.d/blacklist_{net,sound}.conf were automatically created (I did NOT create them; in fact, I didn't even know how to blacklist modules) with MODULES I blacklisted using the deprecated !bang syntax for debugging purposes. However, after removing the '!' the modules were still blacklisted because of the modprobe files that were generated.

I think that's very confusing. You should either

1) have full backwards compatibility for the !blacklisted syntax by removing those entries from the modprobe files if the exclamation mark was removed
2) or have no backwards compatibility at all, ignoring the exclamation marks/complaining.
Comment by Alen (Kosava) - Thursday, 04 August 2011, 11:56 GMT
@Karol Błażewicz (karol) yes i removed it, network now works, but i dont have sound, and when i do alsaconf they dont find my soundcard...
Comment by Tom Gundersen (tomegun) - Thursday, 04 August 2011, 11:56 GMT
@dauberbaustelle:

Just to clarify a bit: the blacklist_{net,sound} modules were created by the installer you used, and this will be fixed in its next release.

There was never a backwards compatibility mechanism that would automatically convert the exclamation marks in rc.conf to the native blacklisting at runtime. I don't think archboot did this at install time either, it just blacklisted everything unconditionally.
Comment by Tom Gundersen (tomegun) - Thursday, 04 August 2011, 11:57 GMT
@Alen: please check if your sound modules are loaded (lsmod).
Comment by Tom Gundersen (tomegun) - Thursday, 04 August 2011, 11:58 GMT
(and if they are not, try to load them manually)
Comment by Alen (Kosava) - Thursday, 04 August 2011, 12:01 GMT
Here is my lsmod output (dont know lot about this)

http://pastebin.com/DrA5k4jG
Comment by Karol Błażewicz (karol) - Thursday, 04 August 2011, 12:03 GMT
If someone is having problems, I suggest opening a thread in the forums to keep the discussion here to a minimum.
Comment by Tom Gundersen (tomegun) - Thursday, 04 August 2011, 12:16 GMT
@Alen: looks ok. Better do as Karol says and take it to the forums as it would take a lot of debugging to figure out (there was a discussion about this in the systemd thread, in case you use systemd).
Comment by Tobias Powalowski (tpowa) - Thursday, 04 August 2011, 14:41 GMT
To clarify, archboot created the blacklist_{net,sound}files in /etc/modprobe.d/
Yes it was not documented yet, because i haven't had the time.
New initscripts causes blacklisted modules not to load in rc.conf MODULES= array anymore, please remove
the blacklist files in /etc/modprobe.d/ directory
It will be replaced by udev rules creation for network and modprobe.d files for sound in 08.2011

Loading...