Bug 1249427 - upon install or upgrade, dnf removes kernel even if there are fewer than installonly_limit kernels installed
upon install or upgrade, dnf removes kernel even if there are fewer than inst...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-02 18:23 EDT by Dominik 'Rathann' Mierzejewski
Modified: 2015-08-03 07:08 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-03 07:08:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dominik 'Rathann' Mierzejewski 2015-08-02 18:23:07 EDT
Description of problem:
Upon install or upgrade, dnf removes one existing kernel even if there are fewer than installonly_limit kernels installed.

Version-Release number of selected component (if applicable):
$ rpm -qa  \*dnf\* \*hawkey\*|sort
dnf-1.0.2-3.fc22.noarch
dnf-conf-1.0.2-3.fc22.noarch
dnf-langpacks-0.11.1-1.fc22.noarch
dnf-plugins-core-0.1.9-1.fc22.noarch
dnf-yum-1.0.2-3.fc22.noarch
hawkey-0.5.9-3.fc22.x86_64
python-dnf-1.0.2-3.fc22.noarch
python-dnf-plugins-core-0.1.9-1.fc22.noarch
python-dnf-plugins-extras-common-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-migrate-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-repomanage-0.0.9-1.fc22.noarch
python-hawkey-0.5.9-3.fc22.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. Have the following kernels installed:
$ rpm -q kernel
kernel-4.0.7-300.fc22.x86_64
kernel-4.0.8-300.fc22.x86_64
2. Make sure installonly_limit is more than 2:
$ grep installonly /etc/dnf/dnf.conf 
installonly_limit=3
3. dnf upgrade or dnf install kernel

Actual results:
dnf tries to install kernel-4.1.3-200.fc22 (expected) and remove kernel-4.0.7-300.fc22 (not expected!)

Expected results:
dnf should only install the requested kernel, not remove any that are below installonly_limit.
Comment 1 Dominik 'Rathann' Mierzejewski 2015-08-02 19:38:06 EDT
Actually, bumping installonly_limit to 4 makes dnf keep 3 kernels as expected, so I'm suspecting an off-by-one error in the code. Could this be a duplicate of bug 1214562 or is this another issue?
Comment 2 Dominik 'Rathann' Mierzejewski 2015-08-03 07:08:31 EDT
Sorry for the noise. I found that I only removed kernel, but kernel-core and kernel-modules were still there, so everything works as designed.

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