Bug 1293782 - dnf clean all does not wait for current running upgrade
dnf clean all does not wait for current running upgrade
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: EasyFix, Triaged
Depends On:
  Show dependency treegraph
Reported: 2015-12-22 23:44 EST by Christopher Tubbs
Modified: 2016-12-15 07:18 EST (History)
6 users (show)

See Also:
Fixed In Version: dnf-2.0.0-1.fc26
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-12-15 07:18:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Tail of dnf upgrade output, including the error (9.24 KB, text/plain)
2015-12-22 23:44 EST, Christopher Tubbs
no flags Details

  None (edit)
Description Christopher Tubbs 2015-12-22 23:44:12 EST
Created attachment 1108829 [details]
Tail of dnf upgrade output, including the error

Description of problem:
I ran a `sudo dnf upgrade`, and while it was running, I inadvertently triggered a script I wrote which does a `sudo dnf clean all`. The clean finished successfully, but interrupted the ongoing upgrade, resulting in many duplicated packages (as seen by `sudo dnf repoquery --duplicated`).

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

How reproducible:

Steps to Reproduce:
1. run dnf upgrade
2. run dnf clean all in another terminal

Actual results:
`dnf clean all` finished successfully, but the `dnf upgrade` was interrupted with a failure.

Expected results:
`dnf clean all` should have waited for the upgrade to finish.

Additional info:

This left the rpmdb in a pretty corrupted state that is difficult to recover from. I can't easily remove dupes either, because dnf complains about removing the protected package "dnf".
Comment 1 Michal Luscon 2015-12-23 07:50:18 EST
We should adjust clean to hold download and rpmdb locks.
Comment 2 Fedora Admin XMLRPC Client 2016-07-08 05:37:45 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Christopher Tubbs 2016-07-22 16:16:04 EDT
Why was the severity dropped? This bug results in some pretty severe consequences. I can understand the developers considering it low priority... that's up to them, but the consequences are pretty bad. The severity should be left elevated.
Comment 4 Fedora End Of Life 2016-11-24 09:28:23 EST
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 Christopher Tubbs 2016-11-24 12:23:54 EST
The consequences of this bug are pretty severe. And, the above comments indicate it's a relatively easy fix. I haven't tested recently (because it's too easy to mess up a system), but since there hasn't been any activity here, I'm thinking this is probably still an issue.

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