Description of problem: I have a RHEL5 box with the default 2.6.18-8.el5 kernel and RHEL 5.1's 2.6.18-53.el5 kernels installed. With 2.6.18-8.el5 as the running kernel, I installed (via DKMS) a newer version of megaraid_sas.ko. The driver was installed in /lib/modules/2.6.18-8.el5/extra. This also creates the weak-modules link for 2.6.18-53.el5: /lib/modules/2.6.18-53.el5/weak-updates/megaraid_sas.ko -> /lib/modules/2.6.18-8.el5/extra/megaraid_sas.ko I then tried to remove the weak-module for 2.6.18-53.el5 : # echo "/lib/modules/2.6.18-8.el5/extra/megaraid_sas.ko" |weak-modules --verbose --remove-modules rm -f /lib/modules/2.6.18-53.el5/weak-updates/megaraid_sas.ko Module megaraid_sas.ko from kernel 2.6.18-8.el5 is compatible with kernel 2.6.18-53.el5 Adding compatible module megaraid_sas.ko from kernel 2.6.18-8.el5 instead ln -s /lib/modules/2.6.18-8.el5/extra/megaraid_sas.ko /lib/modules/2.6.18-53.el5/weak-updates/megaraid_sas.ko rmdir --parents --ignore-fail-on-non-empty /lib/modules/2.6.18-53.el5/weak-updates /sbin/depmod -ae -F /boot/System.map-2.6.18-53.el5 2.6.18-53.el5 /sbin/depmod -ae -F /boot/System.map-2.6.18-8.el5 2.6.18-8.el5 Here, "rm -f" and "ln -s" in effect, re-create the link. Net result is after running weak-modules --remove-modules, /lib/modules/2.6.18-53.el5/weak-updates/megaraid_sas.ko continues to exist. This breaks "dkms remove" which invokes "weak-modules --remove-modules" and then removes the original driver module from /lib/modules/2.6.18-8.el5/extra , but since weak-modules recreated the link in /lib/modules/2.6.18-53.el5/weak-modules, we are left with a broken link here. Version-Release number of selected component (if applicable): module-init-tools-3.3-0.pre3.1.34.el5 How reproducible: Always Steps to Reproduce: 1. Install RHEL5, install 2.6.18-53.el5 kernel 2. Install megaraid_sas DKMS driver package 3. # echo "/lib/modules/2.6.18-8.el5/extra/megaraid_sas.ko" |weak-modules --verbose --remove-modules Actual results: weak-modules --remove-modules does not remove the soft link in /lib/modules/2.6.18-53.el5/weak-modules Expected results: weak-modules --remove-modules removes the soft link in /lib/modules/2.6.18-53.el5/weak-modules Additional info: Megaraid_sas DKMS driver package: ftp://ftp.us.dell.com/SAS-RAID/megaraid_sas-v00.00.03.16.tgz
Created attachment 295005 [details] Possible fix This worked for me, but not tried many scenarios.
The thing is, the intended functionality of this option is to remove a module and then replace the removed module with whatever older release is available - it's behaving as designed. However, I can see that you have a legitimate need for an alternative option here. How about --delete-modules? Jon.
(In reply to comment #3) > for an alternative option here. How about --delete-modules? Yes, this would be a good addition.
This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. If you would like this request to be reviewed for the next minor release, ask your support representative to set the next rhel-x.y flag to "?".
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
In module-init-tools-3_3-0_pre3_1_39_el5
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-2009-0093.html