Bug 1253264

Summary: dnf distro-sync --allowerasing doesn't work with booted old kernel
Product: [Fedora] Fedora Reporter: Daniel Mach <dmach>
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 26CC: bruno, dmach, jmracek, mluscon, mmraka, packaging-team-maint, pnemade, tim.lauridsen, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-12 18:15:55 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 Daniel Mach 2015-08-13 11:12:03 UTC
$ dnf distro-sync

$ rpm -qa kernel
kernel-4.0.6-300.fc22.x86_64
kernel-4.1.4-200.fc22.x86_64
kernel-4.2.0-0.rc5.git0.2.fc23.x86_64

reboot, select kernel that's not the latest

$ uname -r
4.0.6-300.fc22.x86_64

$ dnf distro-sync --allowerasing
Error: The operation would result in removing the booted kernel: kernel-core-4.0.6-300.fc22.x86_64.

Comment 1 Honza Silhan 2015-08-31 13:50:18 UTC
*** Bug 1255463 has been marked as a duplicate of this bug. ***

Comment 2 Bruno Wolff III 2015-08-31 15:02:27 UTC
(This is in reply to https://bugzilla.redhat.com/show_bug.cgi?id=1255463#c1 :
Removing the oldest doesn't necessarily make sense for distro-sync. There may not even be a kernel upgrade happening. Probably you first want to see which old kernels are being removed because they are no longer in any repos (while keeping stuff associated with the running kernel such as -core, -modules and -modules-extra) and then see if you still need to remove some to keep within the install limit.

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

Comment 4 Fedora End Of Life 2016-11-24 12:18:19 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. 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 '23'.

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 23 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 Michael Mráka 2016-11-30 08:53:35 UTC
Still valid dnf-2.0.0-0.rc1.4.fc26.noarch.

Comment 6 Fedora End Of Life 2017-02-28 09:48:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 7 Jaroslav Mracek 2017-05-05 07:18:46 UTC
I am sorry but I cannot reproduce it with dnf-2.3.0-1 and libdnf-0.8.1-1

Comment 8 Jaroslav Mracek 2017-05-12 18:15:55 UTC
I think that with this patch (https://github.com/rpm-software-management/libdnf/pull/285) dnf will work like Swiss ... :-) .