kernel-rt-core and kernel-rt-kvm both provide modules.kvm which causes installation failures

Bug #1952488 reported by M. Vefa Bicakci
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Critical
M. Vefa Bicakci

Bug Description

Brief Description
-----------------
Due to a bug in kernel-rt.spec in stx/kernel, the kernel-rt-core and kernel-rt-kvm RPM packages both provide a /lib/modules/<kernel version>/modules.kvm file, which causes installation failures in conjunction with the kernel binary signing fix-up at "https://review.opendev.org/c/starlingx/root/+/819138".

Severity
--------
Critical: ISO installation with low-latency/preempt-rt profile fails due to this issue.

Steps to Reproduce
------------------
Attempting to install an ISO file containing a signed kernel binary (vmlinuz) file using All-in-One (AiO) low-latency profile fails.

Expected Behavior
------------------
Installation succeeds.

Actual Behavior
----------------
Installation fails with an error message similar to the following:

YumRPMTransError: Could not run transaction.
file /lib/modules/5.10.74-XXX.XXXX.tis.rt.el7.x86_64/modules.kvm conflicts
between attempted installs of kernel-rt-kvm-5.10.74-XXX.XXXX.tis.rt.el7.x86_64
and kernel-rt-core-5.10.74-XXX.XXXX.tis.rt.el7.x86_64

Reproducibility
---------------
100%

System Configuration
--------------------
All-in-One mode, low-latency profile installation

Branch/Pull Time/Commit
-----------------------
Since https://review.opendev.org/c/starlingx/root/+/819138 has been merged.

Last Pass
---------
Yes, all ISO images that do not include https://review.opendev.org/c/starlingx/root/+/819138 are expected to pass installation.

Timestamp/Logs
--------------
None.

Test Activity
-------------
Sanity

Workaround
----------
No workaround exists other than using the standard (non-low-latency) profile at installation time.

Changed in starlingx:
assignee: nobody → M. Vefa Bicakci (vbicakci)
status: New → Confirmed
Revision history for this message
Ghada Khalil (gkhalil) wrote :

screening: stx.6.0 / critical - this prevents installs with the rt-kernel

Changed in starlingx:
importance: Undecided → Critical
tags: added: stx.6.0 stx.distro.other
Changed in starlingx:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kernel (master)

Reviewed: https://review.opendev.org/c/starlingx/kernel/+/819508
Committed: https://opendev.org/starlingx/kernel/commit/e0a913e78ab82bb7fd7ffe7ea588b5c8f3bd0fb8
Submitter: "Zuul (22348)"
Branch: master

commit e0a913e78ab82bb7fd7ffe7ea588b5c8f3bd0fb8
Author: M. Vefa Bicakci <email address hidden>
Date: Fri Nov 26 17:13:56 2021 -0500

    kernel-rt.spec: Install modules.kvm only once

    Unlike the standard kernel's kernel.spec, the low-latency/preempt-rt
    kernel's kernel-rt.spec splits KVM-related kernel modules into a
    separate RPM package, named kernel-rt-kvm. However, there exists a bug
    in the generation of the kernel-rt-core RPM package, which causes the
    file /lib/modules/<kver>/modules.kvm file to be included in
    kernel-rt-core package as well as the kernel-rt-kvm package.

    This issue has not been problematic until commit bccb327f150f ("Fix
    secure boot signing of 5.10 kernel") has been merged to the
    starlingx/root repository. For easier cross-referencing, the
    aforementioned commit's change identifier is as follows:
      I4f49b9ac48fa50397aa98b8075386400b62ec6fa

    With the aforementioned change and with an ISO file that includes a
    kernel-rt-core RPM package that has been regenerated for binary code
    signing, the following installation error is encountered at installation
    time in All-in-One mode and low-latency profile:

      YumRPMTransError: Could not run transaction.
      file /lib/modules/5.10.74-XXX.XXXX.tis.rt.el7.x86_64/modules.kvm
      conflicts between attempted installs of
      kernel-rt-kvm-5.10.74-XXX.XXXX.tis.rt.el7.x86_64 and
      kernel-rt-core-5.10.74-XXX.XXXX.tis.rt.el7.x86_64

    The reason why the aforementioned commit uncovers this issue is not
    fully known, but is most likely because the procedure for signing the
    kernel binaries regenerates the RPM files, which, along the way, change
    the attributes (such as the timestamp) of the modules.kvm file in
    kernel-rt-core. The discrepancy of the modules.kvm file's attributes
    between kernel-rt-core and kernel-rt-kvm appears to cause this issue.

    This commit resolves this issue by ensuring that the modules.kvm file is
    only provided by the kernel-rt-kvm RPM package and not the
    kernel-rt-core package.

    Verification:
    - An ISO image was built successfully with an incremental monolithic
      build.
    - The generated kernel-rt-core RPM package was confirmed to not include
      a modules.kvm file.
    - The built ISO image was confirmed to successfully install onto a VM
      using the All-in-One mode with low-latency profile.

    Closes-Bug: #1952488

    Signed-off-by: M. Vefa Bicakci <email address hidden>
    Change-Id: I5e783c9b931450a5b81d6b597892e93a66ddd25f

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.