Bug 477089
| Summary: | weak-modules --remove-modules add same modules as compatible module | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Joe Jin <joe.jin> | ||||
| Component: | module-init-tools | Assignee: | Jon Masters <jcm> | ||||
| Status: | CLOSED ERRATA | QA Contact: | BaseOS QE <qe-baseos-auto> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 5.3 | CC: | ajb, amyagi, deepak.patel, gerhart, martin.wilck, mgahagan, phil, ykopkova | ||||
| Target Milestone: | rc | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-03-30 08:25:05 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Not sure exactly what is being requested as I think you're referring to intended behavior. When script weak-module with "--remove-module" tried to remove weak module,
if system just exist one compatible module, it will re-added will remove module
as compatible module again.
For example, system have installed kmod-xenpv package, the package built based
kernel 2.6.18-53, OS kernel running kernel is 2.6.18-92, then when installed
kmod-xenpv it will add all modules of kmod-xenpv pkg as weak module at
/lib/module/2.6.18-92/weak-modules/xenpv/0.1-9/*
# rpm -q kmod-xenpv-0.1-9
Then I try to remove all weak module with weak-module:
# modules=( $(rpm -ql kmod-xenpv-0.1-9 | grep '\.ko$') )
# printf '%s\n' "${modules[@]}" | /sbin/weak-modules --remove-modules
after above commands finished, check /lib/modules/2.6.18-92/weak-modules/xenpv/* found
weak module still existed and not removed by the script.
Please check it.
Thanks,
Joe
> The patch will resolve it, please review.
Behaviour of unpatched weak-modules:
original kernel module location:
/lib/modules/2.6.18-92.el5/extra/wn/wn_javapos_portio.ko
weak modules link after calling --add-modules:
/lib/modules/2.6.18-92.1.18.1.wn.el5/weak-updates/wn/wn_javapos_portio.ko
After calling
$ echo '/lib/modules/2.6.18-92.el5/extra/wn/wn_javapos_portio.ko' | /sbin/weak-modules --remove-modules
..the link is not removed.
After applying your patch, removing the link with the "--remove-modules" command works properly.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0242.html This fix happens to break upgrades of existing kmods. It's not done often, but it is causing problems for e.g. the ELrepo folks. So we expect to have to respin this as a Zstream: http://elrepo.org/bugs/view.php?id=64 Please see https://bugzilla.redhat.com/show_bug.cgi?id=593504#c21. This change should never have been applied. It is wrong. I am inclined to agree. This should never have been done, and it will be corrected. |
Created attachment 327398 [details] Patch for this issue Description of problem: Call weak-modules with --remove-modules, found sometime it could not remove the modules links. after script finished. checked weak-modules found when remove-modules, it try to found a compatible modules instead remove links, but it was not check if remove module links as same as compatible module. The patch will resolve it, please review.