View Issue Details

IDProjectCategoryView StatusLast Update
0001060channel: elrepo/el8kmod-mpt3saspublic2021-03-03 19:20
Reportergbrandl Assigned Topperry  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status resolvedResolutionfixed 
Platformx86_64OSCentOSOS Version8
Summary0001060: dracut not called in posttrans since /boot/symvers-* is missing
DescriptionIn the `posttrans` snippet of the mpt3sas module (8.2 and 8.3 build), the following snippet is responsible for calling dracut to add the module to initramfs:

```
                # The same check as in weak-modules: we assume that the kernel present
                # if the symvers file exists.
                if [ -e "/boot/symvers-$k.gz" ]; then
                        /usr/bin/dracut -f "$tmp_initramfs" "$k" || exit 1
```

However, on my CentOS system (installed as 8.2, then upgraded to 8.3), no `/boot/symvers-*` files exist although the kernels are present.

Looking into `/usr/sbin/weak-modules`, parts of which this snippet apparently reimplements, I see (line 552):

```
# find_symvers_file:
# Since /boot/ files population process is now controlled by systemd's
# kernel-install bash script and its plug-ins, it might be the case
# that, while present, symvers file is not populated in /boot.
# Let's also check for /lib/modules/$kver/symvers.gz, since that's where
# it is populated from.
```

So it seems that the check in the posttrans is not correct anymore for this version of CentOS, and needs to be adapted to also check in `/lib/modules`?
TagsNo tags attached.

Activities

pperry

2020-12-15 11:48

administrator   ~0007332

Interesting - thank you.

Looks like you are correct - symvers.gz is now located at /lib/modules/<kversion>/symvers.gz

pperry

2020-12-18 03:56

administrator   ~0007356

Apologies for the delay...

We are proposing the following simple patch:

        # The same check as in weak-modules: we assume that the kernel present
        # if the symvers file exists.
- if [ -e "/boot/symvers-$k.gz" ]; then
+ if [ -e "/lib/modules/%{kmod_kernel_version}.x86_64/symvers.gz" ]; then
            /usr/bin/dracut -f "$tmp_initramfs" "$k" || exit 1

I will try to get this (and other affected storage) package(s) fixed and released over the weekend.

Thank you again for this bug report - we really appreciate it.

gbrandl

2020-12-18 04:26

reporter   ~0007357

Great! BTW, it looks like this snippet is not only in storage packages, I also found it in rtl8187 and e100, for example.

pperry

2020-12-18 08:30

administrator   ~0007358

Correct, it affects ALL packages, as it's part of the standard template we use. However, not all drivers need to be in the initramfs to enable the system to boot so we will concentrate on rebuilding those packages affected most first, and queue the fix to all other packages as part of their next rebuild. Users can also work around temporarily by manually rebuilding their initramfs file if needed.

If you find the issue is affecting you with other packages, please say (or open a bug), and I'll happily fix and rebuild sooner, but I didn't want to invoke a mass rebuild of every package unless absolutely necessary.

Again, we really appreciate you highlighting this issue, which crept in following a change in the way the disto kernel packages symvers.

gbrandl

2020-12-18 08:37

reporter   ~0007359

I'm happy with mpt3sas being fixed. Thanks for your quick reaction and handling of the bug!

pperry

2020-12-18 15:46

administrator   ~0007361

I've built updated kmod-mpt3sas packages with the following patch and released to the main repository. Packages are currently syncing to the mirrors and should show up shortly.

        # The same check as in weak-modules: we assume that the kernel present
        # if the symvers file exists.
- if [ -e "/boot/symvers-$k.gz" ]; then
+ if [ -e "$k_dir/symvers.gz" ]; then
            /usr/bin/dracut -f "$tmp_initramfs" "$k" || exit 1
            cmp -s "$tmp_initramfs" "$dst_initramfs"


I've tested locally, and the initramfs image is now updated for me.

Please can you test and let me know if you feel it's fixed the issue for you.

Many thanks.

gbrandl

2020-12-19 03:09

reporter   ~0007363

Positive: Installed the -2 package on a fresh system and it did regenerate initramfs.

pperry

2020-12-19 06:44

administrator   ~0007364

Great, thank you for the feedback - much appreciated.

Closing as fixed. Please feel free to open further reports if you have issues.

toracat

2020-12-19 19:54

administrator   ~0007366

Red Hat kmod packages have the same issue. Filed a bug here:

https://bugzilla.redhat.com/show_bug.cgi?id=1909441

toracat

2021-02-23 12:37

administrator   ~0007471

The RHBZ has been closed as 'fixed'. A solution article is now available:

https://access.redhat.com/solutions/5681371

toracat

2021-03-03 19:20

administrator   ~0007487

RH fixed the bug as follows (using kmod-redhat-mlx5_core as an example):

$ diff kmod-redhat-mlx5_core.spec.old2 kmod-redhat-mlx5_core.spec
6c6
< %define kmod_rpm_release 2
---
> %define kmod_rpm_release 3
475c475
< if [ -e "/boot/symvers-$k.gz" ]; then
---
> if [ -e "/boot/symvers-$k.gz" ] || [ -e "$k_dir/symvers.gz" ]; then
924a925,928
> * Wed Jan 13 2021 Eugene Syromiatnikov <esyr@redhat.com> 5.0_0_dup8.2-3
> - Check for symvers.gz presence in /lib/modules/KVER in addition to boot
> (#1915479).

Issue History

Date Modified Username Field Change
2020-12-15 11:03 gbrandl New Issue
2020-12-15 11:03 gbrandl Status new => assigned
2020-12-15 11:03 gbrandl Assigned To => pperry
2020-12-15 11:48 pperry Note Added: 0007332
2020-12-18 03:56 pperry Note Added: 0007356
2020-12-18 04:26 gbrandl Note Added: 0007357
2020-12-18 08:30 pperry Note Added: 0007358
2020-12-18 08:37 gbrandl Note Added: 0007359
2020-12-18 15:46 pperry Note Added: 0007361
2020-12-19 03:09 gbrandl Note Added: 0007363
2020-12-19 06:44 pperry Note Added: 0007364
2020-12-19 06:44 pperry Status assigned => resolved
2020-12-19 06:44 pperry Resolution open => fixed
2020-12-19 19:54 toracat Note Added: 0007366
2021-02-23 12:37 toracat Note Added: 0007471
2021-03-03 19:20 toracat Note Added: 0007487