Opened 10 years ago

Closed 10 years ago

#362 closed enhancement (fixed)

Mindi: improved handling of finding kernel module files

Reported by: Matthew Cline Owned by: bruno
Priority: normal Milestone: 2.2.9.2
Component: mindi Version: 2.2.8
Severity: normal Keywords:
Cc:

Description

Attached is a patch that makes two improvements to the handling of finding kernel module files. Less importantly, when a module file can't be found, it notes in the log file whether or not the module is a live one (one the system is actually currently using) or is one from EXTRA_MODS:

module nvidia --> [live module file not found]
module lvm-mod --> [extra module file not found]

This should be useful for trouble-shooting, since a missing live module is probably a lot more likely to cause trouble than a missing extra module.

More importantly, if a module's name uses "_"s but its filename uses "-"s, then mindi will now be able to find the file.

Attachments (2)

mindi-kern.patch (1.9 KB) - added by Matthew Cline 10 years ago.
Patch against mindi 2.0.6-1
mindi-kern-modprobe.patch (2.5 KB) - added by Matthew Cline 10 years ago.
Patch against mindi 2.0.6-1

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by Matthew Cline

Patch against mindi 2.0.6-1

comment:1 Changed 10 years ago by bruno

  • Status changed from new to assigned

comment:2 Changed 10 years ago by Matthew Cline

Here's a slightly improved patch: if mindi can't find a kernel module file normally, and can't find it by replacing "_"s with "-s", then it tries "modprobe --dry-run -v ${module}". For example, on my system, the module named nvidia has the filename nvidia-current, which this technique can find.

Changed 10 years ago by Matthew Cline

Patch against mindi 2.0.6-1

comment:3 Changed 10 years ago by bruno

I recognize that there is indeed a long time issue with the finding of modules in mindi. However, your patch can not be applied as is. For example if you work with the non runnig kernel (which mindi supports) it will not give the right answer, becasue modprobe uses only the running kernel.

For the moment - and _ in module names are handled by duplicating the module name in the list, in order to have both. Not elegant but works.

I applied a portion of your patch for printing more user friendly messages when a module is not found. Thanks for the suggestion. Will be in next mindi. (part of [2471)

comment:4 Changed 10 years ago by bruno

  • Milestone changed from 2.2.10 to 2.2.9.2
  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.