Bug 1199715 - dnf updates instead of installs kernel-PAE rpms (yum did too)
Summary: dnf updates instead of installs kernel-PAE rpms (yum did too)
Keywords:
Status: CLOSED DUPLICATE of bug 1382247
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-07 10:52 UTC by Trevor Cordes
Modified: 2016-11-21 09:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-21 09:09:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Trevor Cordes 2015-03-07 10:52:54 UTC
Description of problem:
Ever since a yum upgrade of several boxes from F20 to F21 "yum update" has been *updating* (not *installing*) the kernel rpm!  The result is there is only ever one kernel installed, and the running one gets immediately deleted during the yum update.

BUT only on my i686-PAE boxes. NOT on the non-PAE i686 boxes and NOT on x86_64.

I triple-checked my yum configs to make sure I wasn't doing something weird with installonly, etc, and I can't find anything that would affect this.  I only noticed now during an upgrade of another box and the F20 kernel was removed immediately during the "yum --releasever=21 --setopt=deltarpm=0 --disableplugin=presto distro-sync" and only the F21 kernel remained.

I noticed the kernel naming scheme changed a bit recently (was it for F21?), perhaps that has something to do with it?

uname -a
3.18.7-200.fc21.i686+PAE

I could swear the "+PAE" didn't used to be there, but was somewhere else in the string, but I now have no old boxes to check this on.

Also, while entering this bug I noticed that I am setting in yum.conf:
obsoletes=1
But I checked and I'm setting this on all my boxes (even non-PAE) so if that is causing this bug, then it is a bug that it isn't causing it on non-PAE also (and vice versa).  I don't remember why I have that option in there, but I've had it there forever.



Version-Release number of selected component (if applicable):
kernel-PAE-3.18.7-200.fc21.i686
yum-3.4.3-153.fc21.noarch
rpm-4.12.0.1-4.fc21.i686



How reproducible:
Always on PAE systems.


Steps to Reproduce:
1. Get yourself a PAE box and install PAE kernel, uninstall non-PAE kernels
2. (probably optional) upgrade from F20 to F21 using yum
3. yum update   when a new kernel comes out


Actual results:
#grep kernel-3 /var/log/yum
/var/log/yum.log:Jan 13 03:02:39 Installed: kernel-PAE-3.17.8-200.fc20.i686
/var/log/yum.log:Jan 17 23:53:59 Updated: kernel-PAE-3.17.8-300.fc21.i686
/var/log/yum.log:Jan 26 06:56:12 Updated: kernel-PAE-3.18.3-201.fc21.i686
/var/log/yum.log:Feb 12 15:43:58 Updated: kernel-PAE-3.18.5-201.fc21.i686
#rpm -q kernel kernel-PAE
package kernel is not installed
kernel-PAE-3.18.7-200.fc21.i686



Expected results:
# should look like these non-PAE boxes, but of course with the PAE kernel in place of the non-PAE one:
/var/log/yum.log:Jan 19 04:55:28 Installed: kernel-3.17.8-200.fc20.i686
/var/log/yum.log:Jan 19 06:25:17 Installed: kernel-3.17.8-300.fc21.i686
/var/log/yum.log:Jan 27 23:10:04 Installed: kernel-3.18.3-201.fc21.i686
/var/log/yum.log:Feb 10 15:41:31 Installed: kernel-3.18.5-201.fc21.i686
/var/log/yum.log:Feb 17 09:53:52 Installed: kernel-3.18.7-200.fc21.i686

# see not above first:
#rpm -q kernel kernel-PAE
kernel-3.18.3-201.fc21.i686
kernel-3.18.5-201.fc21.i686
kernel-3.18.7-200.fc21.i686
package kernel-PAE is not installed



Additional info:
#cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
# this limits the kernel install to a lower number
installonly_limit=3


#cat /etc/yum.repos.d/fedora-updates.repo
[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
enabled=1
metadata_expire=6h
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

Comment 1 Trevor Cordes 2015-03-07 11:03:15 UTC
Further investigation yields some interesting info.  I didn't know that F21 introduces a kernel-(.*)?core package into the mix.  The core rpms seem to be installing (not updating) ok!  But the non-core PAE rpm is not.  It looks like (based on what the non-PAE ones are doing) that it *should* be installing and not updating.

PAE box (bug):
#rpm -qa | grep kernel | grep -vP '-headers|-tools'|sort
kernel-PAE-3.18.7-200.fc21.i686  <<<<<<<<<<< note only 1!!
kernel-PAE-core-3.18.3-201.fc21.i686
kernel-PAE-core-3.18.5-201.fc21.i686
kernel-PAE-core-3.18.7-200.fc21.i686
kernel-PAE-modules-3.18.3-201.fc21.i686
kernel-PAE-modules-3.18.5-201.fc21.i686
kernel-PAE-modules-3.18.7-200.fc21.i686

non-PAE box (ok):
#rpm -qa | grep kernel | grep -vP '-headers|-tools'|sort
kernel-3.18.3-201.fc21.i686  <<<<<<<<<<<<<< note many!
kernel-3.18.5-201.fc21.i686  <<<<<<<<<<<
kernel-3.18.7-200.fc21.i686  <<<<<<<<<
kernel-core-3.18.3-201.fc21.i686
kernel-core-3.18.5-201.fc21.i686
kernel-core-3.18.7-200.fc21.i686
kernel-modules-3.18.3-201.fc21.i686
kernel-modules-3.18.5-201.fc21.i686
kernel-modules-3.18.7-200.fc21.i686

Comment 2 Trevor Cordes 2015-03-09 13:18:23 UTC
I had one final box to do (and test) on and this time I added into yum.conf one extra line:

installonlypkgs=kernel-PAE kernel-PAE-core kernel

...to manually attempt to force kernel-PAE to be "install" and not "update" while doing the

yum --releasever=21 --setopt=deltarpm=0 --disableplugin=presto distro-sync

That fixed the problem.  Therefore bug must be that yum no longer automatically recognizes kernel-PAE as an install-only package.


So, this final test (PAE box) looked like:
#rpm -qa | grep kernel | grep -vP '-headers|-tools' | sort
kernel-PAE-3.18.7-100.fc20.i686
kernel-PAE-3.18.7-200.fc21.i686
kernel-PAE-core-3.18.7-200.fc21.i686
kernel-PAE-modules-3.18.7-200.fc21.i686

#rpm -q kernel kernel-PAE
package kernel is not installed
kernel-PAE-3.18.7-100.fc20.i686
kernel-PAE-3.18.7-200.fc21.i686

Which is all correct after an upgrade like this.

Comment 3 Trevor Cordes 2015-03-09 13:54:18 UTC
Further, on another PAE box that was upgraded a long while ago, here is what today's yum update presented to me:

Dependencies Resolved

=============================================================================================================================
 Package                              Arch                 Version                            Repository                Size
=============================================================================================================================
Installing:
 kernel-PAE-core                      i686                 3.18.8-201.fc21                    updates                   18 M
 kernel-PAE-modules                   i686                 3.18.8-201.fc21                    updates                   16 M
Updating:
 kernel-PAE                           i686                 3.18.8-201.fc21                    updates                   47 k
 kernel-headers                       i686                 3.18.8-201.fc21                    updates                  960 k
 kernel-tools                         i686                 3.18.8-201.fc21                    updates                  130 k
 kernel-tools-libs                    i686                 3.18.8-201.fc21                    updates                   54 k
Removing:
 kernel-PAE-core                      i686                 3.18.3-201.fc21                    @updates                  40 M
 kernel-PAE-modules                   i686                 3.18.3-201.fc21                    @updates                  16 M


Note how kernel-PAE is in the Updating section, unlike the -core and -modules which are set to install.

Comment 4 Fedora End Of Life 2015-11-04 13:15:21 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2015-12-02 09:52:23 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Trevor Cordes 2015-12-03 05:34:32 UTC
Bug persists in Fedora 22, but it's slightly different.  Now kernel-PAE-modules and kernel-PAE-core behave properly but the kernel-PAE metapackage still wants to update, not install.

Stock dnf.conf gives me this:

#dnf update kernel-PAE\*
Last metadata expiration check performed 2:27:30 ago on Wed Dec  2 21:03:20 2015.
Dependencies resolved.
=============================================================================================================================
 Package                             Arch                  Version                            Repository                Size
=============================================================================================================================
Installing:
 kernel-PAE-core                     i686                  4.2.6-201.fc22                     updates                   19 M
 kernel-PAE-modules                  i686                  4.2.6-201.fc22                     updates                   17 M
Upgrading:
 kernel-PAE                          i686                  4.2.6-201.fc22                     updates                   73 k

Wonky!

Adding the following to dnf.conf fixes everything:
installonlypkgs=kernel-PAE kernel-PAE-core kernel-PAE-modules

#dnf update kernel-PAE\*
Last metadata expiration check performed 2:27:05 ago on Wed Dec  2 21:03:20 2015.
Dependencies resolved.
=============================================================================================================================
 Package                             Arch                  Version                            Repository                Size
=============================================================================================================================
Installing:
 kernel-PAE                          i686                  4.2.6-201.fc22                     updates                   73 k
 kernel-PAE-core                     i686                  4.2.6-201.fc22                     updates                   19 M
 kernel-PAE-modules                  i686                  4.2.6-201.fc22                     updates                   17 M

Strange, but if I add just kernel-PAE to dnf.conf installonlypkgs as you'd expect from the initial test, then it goes really wonky and says:

Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 kernel-PAE                               i686                 4.2.6-201.fc22                    updates                73 k
 kernel-PAE-core                          i686                 4.2.6-201.fc22                    updates                19 M
 kernel-PAE-modules                       i686                 4.2.6-201.fc22                    updates                17 M


When can we get these kernel packages marked as installonly properly?

Aside: can someone tell me how I can tell if an rpm file has been marked installonly?  i.e. How does dnf "know" an rpm is to be installed, not updated?

Comment 7 Trevor Cordes 2015-12-24 05:37:42 UTC
Now it's really broken as of today!  Something must have changed in the metadata?  Now I can't install-only kernel-PAE no matter what I do!!

With no installonlypkgs in dnf:
#dnf update kernel-PAE\*
Last metadata expiration check performed 1:36:08 ago on Wed Dec 23 21:59:01 2015.
Dependencies resolved.
=============================================================================================================================
 Package                             Arch                  Version                            Repository                Size
=============================================================================================================================
Installing:
 kernel-PAE-core                     i686                  4.2.8-200.fc22                     updates                   19 M
 kernel-PAE-modules                  i686                  4.2.8-200.fc22                     updates                   17 M
Upgrading:
 kernel-PAE                          i686                  4.2.8-200.fc22                     updates                   74 k


With "installonlypkgs=kernel-PAE kernel-PAE-core kernel-PAE-modules" in dnf.conf:
* no change, the exact same as above!! *

So now I can't install a new kernel at all!  Very bad!  Please someone help with these package problems.  They occur on multiple computers (any that are PAE).

Comment 8 Trevor Cordes 2015-12-24 05:45:18 UTC
Sorry, ignore/delete comment #7.  I just double-checked and *for this one instance only* I was editing the wrong dnf.conf file (/etc/dnf.conf not /etc/dnf/dnf.conf).

Comment #6 is the behaviour I see still.  If I have installonlypkgs in /etc/dnf/dnf.conf then I can install the PAE kernel stuff properly, but without it (with just the default config) dnf still does the wrong thing by trying to update kernel-PAE instead of installing it.

Comment 9 Trevor Cordes 2016-02-12 10:59:16 UTC
Steve helped to discern the cause of this bug in bug #1306057

We can easily fix this bug by adding to dnf-1.1.6/dnf/const.py.in so that:
INSTALLONLYPKGS=('kernel',
                 'installonlypkg(kernel)',
                 'installonlypkg(kernel-module)',

also gets kernel-PAE (and the rest of *-PAE) into that list!  That should solve it.

Without any installonlypkgs line in dnf.conf, my PAE systems show this output (as per Steve's idea):

#dnf config-manager --dump | grep installonlypkgs
installonlypkgs = (u'kernel', u'installonlypkg(kernel)', u'installonlypkg(kernel-module)', u'installonlypkg(vm)')

Which obviously indicates why *-PAE is being left out of installonlypkgs.

Also, shouldn't kernel-core be in that list also, not just kernel and kernel-module?

Thanks!

Comment 10 Fedora Admin XMLRPC Client 2016-07-08 09:32:15 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 11 Fedora End Of Life 2016-07-19 19:32:53 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 12 Trevor Cordes 2016-10-06 05:35:53 UTC
Problem persists in F23, though slightly different... now if I don't manually set installonlypkgs on a PAE box it tries to do this:

Installing:
 kernel-PAE-core                       i686                 4.7.5-100.fc23                      updates                 19 M
 kernel-PAE-modules                    i686                 4.7.5-100.fc23                      updates                 20 M
Upgrading:
 kernel-PAE                            i686                 4.7.5-100.fc23                      updates                 63 k

Strange!  One would think kernel-PAE aggregation package would also be install-only.  In my mind this means the bug still exists?  Or is that package superfluous as it pertains to this issue?

Also, the suggested command to view the config shows something different (when I don't manually set installonlypkgs):

#dnf config-manager --dump | grep installonlypkgs
installonlypkgs = ('kernel', 'installonlypkg(kernel)', 'installonlypkg(kernel-module)', 'installonlypkg(vm)')

I have no idea how that can show kernel and kernel-module (no PAEs, note!) but not kernel-core yet an actual dnf run results in the situation at the top of this comment!

For the time being I'll keep my:
installonlypkgs=kernel-PAE kernel-PAE-core kernel-PAE-modules kernel kernel-core kernel-modules

config line.

Comment 13 Igor Gnatenko 2016-11-21 09:09:23 UTC

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


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