Bug 1677862

Summary: dnf and strange problems with the kernels
Product: Red Hat Enterprise Linux 7 Reporter: Dusan <bruncko>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.6CC: ajb, bobslists, code, jmracek, pstodulk, rhbugs, toracat
Target Milestone: rcKeywords: Extras, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-19 08:25:01 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 Dusan 2019-02-16 13:38:24 UTC
Description of problem:
Hello,

Firstly basic situation about my OS:
rpm -qa|grep dnf
libdnf-0.22.5-1.el7_6.x86_64
python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
dnf-plugins-core-4.0.2.2-3.el7_6.noarch
dnf-data-4.0.9.2-1.el7_6.noarch
dnf-4.0.9.2-1.el7_6.noarch
python2-dnf-4.0.9.2-1.el7_6.noarch
python2-libdnf-0.22.5-1.el7_6.x86_64
===================
I am using kernel-3.10.0-957.5.1.el7.x86_64 or 3.10.0-957.1.3.el7.x86_64 or kernel-3.10.0-957.el7.x86_64.
When I make sudo dnf update I have following result (example with 3.10.0-957.1.3.el7.x86_64):
Dependencies resolved.

Problem 1: cannot install both kernel-3.10.0-957.5.1.el7.x86_64 and kernel-3.10.0-957.5.1.el7.x86_64
- cannot install the best update candidate for package kernel-3.10.0-957.el7.x86_64
- cannot install the best update candidate for package kernel-3.10.0-957.5.1.el7.x86_64
Problem 2: cannot install both kernel-devel-3.10.0-957.5.1.el7.x86_64 and kernel-devel-3.10.0-957.5.1.el7.x86_64
- cannot install the best update candidate for package kernel-devel-3.10.0-957.5.1.el7.x86_64
- cannot install the best update candidate for package kernel-devel-3.10.0-957.el7.x86_64
========================================================================================================
Package Arch Version Repository Size
==========================================================================================================
Reinstalling:
kernel x86_64 3.10.0-957.1.3.el7 updates 48 M
kernel-devel x86_64 3.10.0-957.5.1.el7 updates 17 M
replacing kernel-devel.x86_64 3.10.0-957.5.1.el7

Transaction Summary
=========================================================================================================

I have installed all kernels kernel-3.10.0-957.5.1.el7.x86_64 or 3.10.0-957.1.3.el7.x86_64 or kernel-3.10.0-957.el7.x86_64 and
all work properly...
Frankly speaking, I do not understand the reason, because if I use sudo yum update, all looks O.K.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Bob 2019-02-23 13:43:20 UTC
I believe I'm having the same problem. It happens since 2019-02-14 on all CentOS 7 systems.

Dnf update always want's to reinstall kernel 3.10.0-957.5.1. But the reinstalled kernel is never loaded after rebooting (no menuentry in grub.cfg is created). Only after reinstalling the kernel with yum the kernel is loaded on reboot. But dnf update will still reinstall the kernel 3.10.0-957.5.1 and the menuentry for 3.10.0-957.5.1 is removed again from grub.cfg.

This is the transaction before the first reinstall happened:
$ sudo dnf history info 209 | grep dnf
    Install  python2-libdnf-0.22.5-1.el7_6.x86_64                      @extras
    Upgrade  dnf-4.0.9.2-1.el7_6.noarch                                @extras
    Upgraded dnf-2.7.5-19.el7_6.noarch                                 @extras
    Upgrade  python2-dnf-4.0.9.2-1.el7_6.noarch                        @extras
    Upgraded python2-dnf-2.7.5-19.el7_6.noarch                         @extras
    Upgrade  dnf-data-4.0.9.2-1.el7_6.noarch                           @extras
    Upgraded dnf-data-2.7.5-19.el7_6.noarch                            @extras
    Upgrade  dnf-automatic-4.0.9.2-1.el7_6.noarch                      @extras
    Upgraded dnf-automatic-2.7.5-19.el7_6.noarch                       @extras
    Upgrade  libdnf-0.22.5-1.el7_6.x86_64                              @extras
    Upgraded libdnf-0.11.1-4.el7_6.x86_64                              @extras


==========
$ uname -srvmpio
Linux 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ rpm -q kernel
kernel-3.10.0-862.14.4.el7.x86_64
kernel-3.10.0-957.1.3.el7.x86_64
kernel-3.10.0-957.5.1.el7.x86_64

$ rpm -qa | grep dnf
dnf-data-4.0.9.2-1.el7_6.noarch
python2-dnf-4.0.9.2-1.el7_6.noarch
cguds-dnf-automatic-5.1-0.el7.centos.noarch
dnf-4.0.9.2-1.el7_6.noarch
dnf-automatic-4.0.9.2-1.el7_6.noarch
libdnf-0.22.5-1.el7_6.x86_64
python2-libdnf-0.22.5-1.el7_6.x86_64

$ sudo dnf update
Last metadata expiration check: 0:12:05 ago on Sat 23 Feb 2019 01:51:13 PM CET.
Dependencies resolved.

 Problem: cannot install both kernel-3.10.0-957.5.1.el7.x86_64 and kernel-3.10.0-957.5.1.el7.x86_64
  - cannot install the best update candidate for package kernel-3.10.0-957.5.1.el7.x86_64
  - cannot install the best update candidate for package kernel-3.10.0-862.14.4.el7.x86_64
================================================================================
 Package        Arch           Version                    Repository       Size
================================================================================
Reinstalling:
 kernel         x86_64         3.10.0-957.5.1.el7         updates          48 M

Transaction Summary
================================================================================

Total download size: 48 M
Installed size: 63 M
Is this ok [y/N]: y
Downloading Packages:
kernel-3.10.0-957.5.1.el7.x86_64.rpm            4.1 MB/s |  48 MB     00:11
--------------------------------------------------------------------------------
Total                                           4.0 MB/s |  48 MB     00:11
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Reinstalling     : kernel-3.10.0-957.5.1.el7.x86_64                       1/2
  Running scriptlet: kernel-3.10.0-957.5.1.el7.x86_64                       1/2
  Running scriptlet: kernel-3.10.0-957.5.1.el7.x86_64                       2/2
  Cleanup          : kernel-3.10.0-957.5.1.el7.x86_64                       2/2
  Running scriptlet: kernel-3.10.0-957.5.1.el7.x86_64                       2/2
  Verifying        : kernel-3.10.0-957.5.1.el7.x86_64                       1/2
  Verifying        : kernel-3.10.0-957.5.1.el7.x86_64                       2/2

Reinstalled:
  kernel-3.10.0-957.5.1.el7.x86_64

Complete!

Comment 3 Akemi Yagi 2019-02-25 07:05:29 UTC
Updating libsolv to 0.6.35 seems to resolve the issue. See bug #1668256 and further upstream #1554820 for details.

Comment 4 Jaroslav Mracek 2019-03-19 08:25:01 UTC

*** This bug has been marked as a duplicate of bug 1668256 ***