Bug 528095 - /SBIN/WEAK-MODULES SCRIPT CREATES INCORRECT LINKS FOR EXTRA MODULES
Summary: /SBIN/WEAK-MODULES SCRIPT CREATES INCORRECT LINKS FOR EXTRA MODULES
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: module-init-tools
Version: 4.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jon Masters
QA Contact: qe-baseos-daemons
URL: http://http://bugzilla.oracle.com/bug...
Whiteboard: modversions component
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-09 02:24 UTC by xiaowei.hu
Modified: 2010-02-25 21:29 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-25 21:29:05 UTC
Target Upstream Version:


Attachments (Terms of Use)
weak-modules-patch (575 bytes, patch)
2009-10-09 02:24 UTC, xiaowei.hu
no flags Details | Diff

Description xiaowei.hu 2009-10-09 02:24:15 UTC
Created attachment 364188 [details]
 weak-modules-patch

Description of problem:
This issue only happens if more than one kernel is installed. So far I have
seen this issue in EL4U6 i386 environment only.
I was installing kmod-xenpv drivers in EL4U6 template. I already have
installed up kernel and respective kmod-xenpv driver.
After that I installed smp and hugemem kernel on this guest. For both kernel
I need respective hugemem and smp kmod-xenpv modules.

While installing hugemem kmod-xenpv module, which installs xen pv drivers,
/sbin/weak-modules script created improper link in smp kernel for xen-vnif
driver.

[root@dhcp-5op3-5op4-east-130-35-71-113 modules]# ls -l
./2.6.9-67.0.22.0.1.ELsmp/weak-updates/xenpv/0.1-10.el4/
total 16
lrwxrwxrwx  1 root root 73 Oct  6 19:57 xennet.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xennet.ko
lrwxrwxrwx  1 root root 75 Oct  6 19:57 xen-vnif.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-vnif.ko
[root@dhcp-5op3-5op4-east-130-35-71-113 modules]#

So to correct this, when I installed kmod-xenpv smp module, it fixed issue
for links for smp kernel, but now hugemem kmod xenpv module points to
incorrect link.

[root@dhcp-5op3-5op4-east-130-35-71-113 modules]# ls -l
./2.6.9-67.0.22.0.1.ELhugemem/weak-updates/xenpv/0.1-10.el4/
total 48
lrwxrwxrwx  1 root root 78 Oct  6 19:57 xen-balloon.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-balloon.ko

lrwxrwxrwx  1 root root 73 Oct  6 19:57 xenblk.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xenblk.ko
lrwxrwxrwx  1 root root 69 Oct  6 20:13 xennet.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELsmp/extra/xenpv/0.1-10.el4/xennet.ko
lrwxrwxrwx  1 root root 83 Oct  6 19:57 xen-platform-pci.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-platform-p
ci.ko
lrwxrwxrwx  1 root root 74 Oct  6 19:57 xen-vbd.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-vbd.ko
lrwxrwxrwx  1 root root 71 Oct  6 20:13 xen-vnif.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELsmp/extra/xenpv/0.1-10.el4/xen-vnif.ko
[root@dhcp-5op3-5op4-east-130-35-71-113 modules]# ls -l
./2.6.9-67.0.22.0.1.ELsmp/weak-updates/xenpv/0.1-10.el4/
total 48
lrwxrwxrwx  1 root root 74 Oct  6 20:13 xen-balloon.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELsmp/extra/xenpv/0.1-10.el4/xen-balloon.ko
lrwxrwxrwx  1 root root 69 Oct  6 20:13 xenblk.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELsmp/extra/xenpv/0.1-10.el4/xenblk.ko
lrwxrwxrwx  1 root root 69 Oct  6 20:13 xennet.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELsmp/extra/xenpv/0.1-10.el4/xennet.ko
lrwxrwxrwx  1 root root 79 Oct  6 20:13 xen-platform-pci.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELsmp/extra/xenpv/0.1-10.el4/xen-platform-pci.k
o
lrwxrwxrwx  1 root root 70 Oct  6 20:13 xen-vbd.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELsmp/extra/xenpv/0.1-10.el4/xen-vbd.ko
lrwxrwxrwx  1 root root 71 Oct  6 20:13 xen-vnif.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELsmp/extra/xenpv/0.1-10.el4/xen-vnif.ko
[root@dhcp-5op3-5op4-east-130-35-71-113 modules]#

Result of this is when I boot smp kernel with correct links networking
(xen-vnif) will work fine, but networking (xen-vnif) will have issues with
hugemem kernel with improper links
As a side effect of this, I was unable to get dhcp address when I booted
hugemem kernel which has improper links in the guest.

When I removed incorrect xen-vnif and other links which is pointing to
incorrect kernel version, and created proper links, on next reboot it loaded
proper xen-vnif modules I was able to get dhcp address with hugemem kernel. I
have to recreate new initrd after correcting links as networking modules were
part of initrd image.

cd ./2.6.9-67.0.22.0.1.ELhugemem/weak-updates/xenpv/0.1-10.el4
[root@dhcp-5op3-5op4-east-130-35-71-113 0.1-10.el4]# rm xennet.ko xen-vnif.ko
rm: remove symbolic link `xennet.ko'? y
rm: remove symbolic link `xen-vnif.ko'? y
[root@dhcp-5op3-5op4-east-130-35-71-113 0.1-10.el4]# ln -s  
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-vnif.ko
xen-vnif.ko
[root@dhcp-5op3-5op4-east-130-35-71-113 0.1-10.el4]# ln -s  
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xennet.ko
xennet.ko
[root@dhcp-5op3-5op4-east-130-35-71-113 0.1-10.el4]# ls -l
total 48
lrwxrwxrwx  1 root root 78 Oct  6 19:57 xen-balloon.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-balloon.ko

lrwxrwxrwx  1 root root 73 Oct  6 19:57 xenblk.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xenblk.ko
lrwxrwxrwx  1 root root 73 Oct  6 20:34 xennet.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xennet.ko
lrwxrwxrwx  1 root root 83 Oct  6 19:57 xen-platform-pci.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-platform-p
ci.ko
lrwxrwxrwx  1 root root 74 Oct  6 19:57 xen-vbd.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-vbd.ko
lrwxrwxrwx  1 root root 75 Oct  6 20:33 xen-vnif.ko ->
/lib/modules/2.6.9-67.0.15.0.1.ELhugemem/extra/xenpv/0.1-10.el4/xen-vnif.ko
[root@dhcp-5op3-5op4-east-130-35-71-113 0.1-10.el4]#

(remake initrd for hugemem kernel)

This issue can also happen in smp xenpv modules, based on which module
installed last. I have seen this issue with EL4U6 i386. I have not seen issue
in X86_64. Looks like /sbin/weak-module script which creates link is looking
for all installed kernels. This issue may happen in EL5GA, EL5U1 and EL5U2
also when there are more than 1 kernel installed (in case of EL5xx i386).

Workaround:

1) remove improper links for "extra" modules to improper kernels
2) create proper links for "extra" modules for all installed kernels.
3) If network drivers are part of initrd image, remake initrd image.

So far we have seen issue with kmod-xenpv modules (extra modules) only. If
there are other modules like this, they may run into same issue too. Same
solution should work fine in that case too. 



fixed


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jon Masters 2010-02-25 21:29:05 UTC
Hi,

We don't officially support using multiple kernel variants like this with driver updates in RHEL4. Therefore I think we do not plan to make changes at this time.

Jon.


Note You need to log in before you can comment on or make changes to this bug.