Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1443217

Summary: /usr/sbin/weak-modules broken with dkms modules
Product: Red Hat Enterprise Linux 7 Reporter: Gary Gatling <gsgatlin>
Component: kmodAssignee: Yauheni Kaliuta <ykaliuta>
Status: CLOSED NOTABUG QA Contact: Ziqian SUN (Zamir) <zsun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: skozina, zsun
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-19 14:57:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gary Gatling 2017-04-18 19:07:56 UTC
Description of problem:

NCSU can't use "out of tree" kernel modules such as the openafs file system built in using DKMS because /usr/sbin/weak-modules incorrectly assumes every thing is a pre-compiled "kmod" and it incorrectly makes symlinks to /usr/lib/modules/*/weak-updates/openafs.ko on every kernel update.

Eventually after enough kernel updates happen all the symlinks are broken and the whole thing is ruined until you un-install and re-install again.

Version-Release number of selected component (if applicable):

kmod-20-9.el7.x86_64

How reproducible:

Install openafs rpms from our third party yum repository at:
http://install.linux.ncsu.edu/pub/yum/itecs/public/openafs/7/noarch/openafs-release-1.0-1.noarch.rpm

Or build yourself from sources here:

https://github.com/gsgatlin/openafs-rpms

Steps to Reproduce:
1. install openafs, openafs-client, openafs-devel, and importantly, openafs-dkms package.
2. upgrade kernel
3. notice weak updates symlinks and error messages on console.

Actual results:

  Cleanup    : kernel-tools-libs-3.10.0-514.10.2.el7.x86_64                                                               8/8 
Error! Module version 2E0F9059976AE5ECC8F5F5B for openafs.ko
is not newer than what is already found in kernel 3.10.0-514.16.1.el7.x86_64 (2E0F9059976AE5ECC8F5F5B).
You may override by specifying --force.
modinfo: ERROR: Module /lib/modules/3.10.0-327.el7.x86_64/weak-updates/ not found.
modinfo: ERROR: Module /lib/modules/3.10.0-514.16.1.el7.x86_64/openafs.ko not found.
modprobe: FATAL: Module /lib/modules/3.10.0-514.16.1.el7.x86_64/openafs.ko not found.
Warning: Module openafs.ko from kernel  has no modversions, so it cannot be reused for kernel 3.10.0-327.el7.x86_64
modinfo: ERROR: Module /lib/modules/3.10.0-514.10.2.el7.x86_64/weak-updates/ not found.
modinfo: ERROR: Module /lib/modules/3.10.0-514.16.1.el7.x86_64/openafs.ko not found.
modprobe: FATAL: Module /lib/modules/3.10.0-514.16.1.el7.x86_64/openafs.ko not found.
Warning: Module openafs.ko from kernel  has no modversions, so it cannot be reused for kernel 3.10.0-514.10.2.el7.x86_64
  Verifying  : kernel-3.10.0-514.16.1.el7.x86_64                                                                          1/8 

Expected results:

 Cleanup    : kernel-tools-libs-3.10.0-514.10.2.el7.x86_64                                                               8/8 
  Verifying  : kernel-3.10.0-514.16.1.el7.x86_64                      


Additional info:

If you remove the contents of /usr/sbin/weak-modules and make the script empty, then everything works correctly just like it works correctly on fedora. Its only on RHEL / CentOS where this is still a problem.

For more info on why this problem even exits please see:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/S7HILMMIKOIIWFAZLCXT6YV3Q6KPIOPB/

So I would like to suggest that broken scripts either be removed or fixed to work with DKMS system since Linux has no stable ABI...

http://www.kroah.com/log/linux/stable_api_nonsense.html

We have to use openafs where I work for at least a while. Moving off openafs is not an option for us at this time. We have no interest in trying to maintain a pre-compiled binary kmod every few weeks or months. We must use DKMS until we switch to auristorFS kmods which auristor INC. will be compiling for us.


Thank you very much.

Comment 5 Stanislav Kozina 2017-04-19 11:52:41 UTC
Hello Gary,

> Description of problem:
> 
> NCSU can't use "out of tree" kernel modules such as the openafs file system
> built in using DKMS because /usr/sbin/weak-modules incorrectly assumes every
> thing is a pre-compiled "kmod" and it incorrectly makes symlinks to
> /usr/lib/modules/*/weak-updates/openafs.ko on every kernel update.

RHEL doesn't support dkms, in fact dkms is not even included in the RHEL release. Can you please provide more information about which version of dkms and from which source did you use to build the modules?

We understand that the using the dkms might be important for your use case, can you please open a standard support ticket for RHEL and mention this bug in the ticket?

> Install openafs rpms from our third party yum repository at:
> http://install.linux.ncsu.edu/pub/yum/itecs/public/openafs/7/noarch/openafs-
> release-1.0-1.noarch.rpm
> 
> Or build yourself from sources here:
> 
> https://github.com/gsgatlin/openafs-rpms

I see that you did also build the -kmod version of the openafs modules. I see that your .spec file is based on the old RHEL-6 template which might not work correctly on RHEL-7.
Recently we've published a new tool for packaging kmods for RHEL:
https://github.com/orosp/ddiskit

Do you think you could use this tool to package the openafs modules?

> For more info on why this problem even exits please see:
> 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/
> thread/S7HILMMIKOIIWFAZLCXT6YV3Q6KPIOPB/

Thanks for pointing out this thread. It nicely describes one of the differencies between Fedora and RHEL. Since Fedora doesn't have stable kernel interface the dkms is the only option for 3rd party modules. RHEL with its stable kernel ABI is in different position and kmods are the main target.

> So I would like to suggest that broken scripts either be removed or fixed to
> work with DKMS system since Linux has no stable ABI...
> 
> http://www.kroah.com/log/linux/stable_api_nonsense.html

RHEL does have stable kernel ABI.

> We have to use openafs where I work for at least a while. Moving off openafs
> is not an option for us at this time. We have no interest in trying to
> maintain a pre-compiled binary kmod every few weeks or months. We must use
> DKMS until we switch to auristorFS kmods which auristor INC. will be
> compiling for us.

I'm surprised that on RHEL support channel the openafs modules would require recompilation every few weeks. Can you please provide list of the kernel symbols used by the openafs modules and which kernel releases changed one of these symbols?

Thank you and Best Regards,
-Stanislav

Comment 7 Gary Gatling 2017-04-19 12:08:32 UTC
It broke when kernel 2.6.32-431.el6.x86_64 came out and again when the kernel with 6.8 came out. (I don't remember the version) It also broke when the kernel in 7.3 came out upgraded from 7.2. 

The dkms package comes from EPEL. Should that be removed from EPEL?

Why does every other distro support DKMS except for RHEL and its clones? on debian openafs-dkms works as expected. Same on Arch. Same on gentoo.

I will open a support ticket as soon as some ex employees of yours show me how on thursday afternoon.

Thank you very much.

Comment 8 Gary Gatling 2017-04-24 13:58:51 UTC
Let me see if I can narrow this down better. I'll try some other kernel modules before I open a standard support ticket for RHEL. Thanks.

Comment 11 Stanislav Kozina 2017-04-25 11:32:18 UTC
(In reply to Gary Gatling from comment #8)
> Let me see if I can narrow this down better. I'll try some other kernel
> modules before I open a standard support ticket for RHEL. Thanks.

Thanks Gary!
We have done some testing with the latest RHEL-7 releases and did not manage to trigger the problem. The best description we have so far is:

"Eventually after enough kernel updates happen all the symlinks are broken and the whole thing is ruined until you un-install and re-install again."

It would be very helpful to find a more reliable reproducer.

If you open the support ticket please make sure to mention this bug there. Thank you!

Comment 13 Gary Gatling 2017-05-19 14:22:24 UTC
Hello. Sorry for the delay in getting back to you.

I set up a RHEL 7.2 box and updated through 17 kernels I downloaded with 3 different modules and the bug appears to be fixed now. I guess either some package got updated or perhaps things went south on some customers machines due to too small of a /boot partition. (tested openafs, bbswitch, and xpad)

weak-modules is making symlinks sometimes but it doesn't seem to hurt anything and the symlinks don't break with my latest tests. So I'm sorry for the trouble. Thanks for your patience. It is odd that the script is only called in RHEL kernel package and not fedora kernel package. Thanks.

Comment 14 Gary Gatling 2017-05-19 14:23:10 UTC
You can close this ticket as NOTABUG thanks.

Comment 15 Stanislav Kozina 2017-05-19 14:57:11 UTC
Gary,

No worries, thank you very much for following up on this issue, really appreciated.

> I set up a RHEL 7.2 box and updated through 17 kernels I downloaded with 3
> different modules and the bug appears to be fixed now. I guess either some
> package got updated or perhaps things went south on some customers machines
> due to too small of a /boot partition. (tested openafs, bbswitch, and xpad)

We recently did significant update to the weak-modules scripts, which is part of the kmod package.

> weak-modules is making symlinks sometimes

The 'sometimes' here means that script creates symlinks for (and only for) the modules which are compatible with the given kernel. That's it's purpose.

> but it doesn't seem to hurt
> anything and the symlinks don't break with my latest tests.

Right, that's how it should work. Thanks for confirmation.

> So I'm sorry for
> the trouble. Thanks for your patience. It is odd that the script is only
> called in RHEL kernel package and not fedora kernel package. Thanks.

Thank you very much for opening this bug and working on the thorough testing. The script is called only for RHEL because Fedora doesn't have any stable kernel interface.

Thanks!