Bug 2163474

Summary: installing a kernel-core dependency bypasses the installonly_limit
Product: Red Hat Enterprise Linux 8 Reporter: jcastran
Component: libdnfAssignee: amatej
Status: CLOSED MIGRATED QA Contact: swm-qe
Severity: high Docs Contact:
Priority: medium    
Version: 8.7CC: amatej, mbocek, mcurlej, prjagtap
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-16 07:56:51 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 jcastran 2023-01-23 15:36:48 UTC
Description of problem:
When a kernel-core dependency is targeted as the install, such as "yum install kernel-core-uname-r", dnf ignores the 3 kernel limit set by installonly_limit

Version-Release number of selected component (if applicable):
dnf-4.7.0-11.el8.noarch
libdnf-0.63.0-11.1.el8.x86_64

How reproducible:
Everytime

Steps to Reproduce:
1. Have 3 (less than latest version) kernel/kernel-cores installed
2. # yum install kernel-core-uname-r
3.

Actual results:
[root@r8 ~]# rpm -q kernel
kernel-4.18.0-372.26.1.el8_6.x86_64
kernel-4.18.0-372.32.1.el8_6.x86_64
kernel-4.18.0-425.3.1.el8.x86_64
 
[root@r8 ~]# rpm -q kernel-core
kernel-core-4.18.0-372.26.1.el8_6.x86_64
kernel-core-4.18.0-372.32.1.el8_6.x86_64
kernel-core-4.18.0-425.3.1.el8.x86_64
 
[root@r8 ~]# yum install kernel-core-uname-r

Installing:
 kernel-core  x86_64  4.18.0-425.10.1.el8_7  rhel-8-for-x86_64-baseos-rpms
Reinstalling:
 kernel-core  x86_64  4.18.0-372.26.1.el8_6  rhel-8-for-x86_64-baseos-rpms
 
[root@r8 ~]# rpm -q kernel
kernel-4.18.0-372.26.1.el8_6.x86_64
kernel-4.18.0-372.32.1.el8_6.x86_64
kernel-4.18.0-425.3.1.el8.x86_64
 
[root@r8 ~]# rpm -q kernel-core
kernel-core-4.18.0-372.32.1.el8_6.x86_64
kernel-core-4.18.0-425.3.1.el8.x86_64
kernel-core-4.18.0-425.10.1.el8_7.x86_64
kernel-core-4.18.0-372.26.1.el8_6.x86_64
 


Expected results:
only 3 kernel/kernel-cores should be installed at a time. The oldest one should be removed when a new kernel is installed. 

Additional info:
This may potentially be the cause for https://bugzilla.redhat.com/show_bug.cgi?id=2163461

Comment 2 amatej 2023-04-24 11:50:16 UTC
Thank you for the report, this is indeed a problem in dnf.

I would like to note though that we discourage installing just kernel-core this way. It will resulting in missing kernel-modules which might lead to a missing functionality on systems.

Comment 6 RHEL Program Management 2023-08-15 07:27:41 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 7 Martin Curlej 2023-08-16 07:56:51 UTC
This bug was migrated to our public Jira instance. From september this year we will stop using bugzilla for bug reporting againts RHEL related products.

The link to the jira bug can be found below:

https://issues.redhat.com/browse/RHEL-1253