Bug 1514624 - Upgrade from Fedora 26 interrupted by power failure
Summary: Upgrade from Fedora 26 interrupted by power failure
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-extras
Version: 30
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-17 22:58 UTC by a.mook
Modified: 2019-10-31 22:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-12 17:29:12 UTC
Type: Bug


Attachments (Terms of Use)

Description a.mook 2017-11-17 22:58:45 UTC
Description of problem: DNF started updating then there was a power failure and now the system does not want to continue with the upgrade. Did a 
dnf system-upgrade clean and restarted the upgrade process but now it stalls and does not even allow package download, let alone the upgrade process.  Please assist. 

How reproducible: haven't tried to reproduce, just want to upgrade!

Steps to Reproduce:

1. sudo dnf upgrade --refresh
2. sudo dnf system-upgrade download --refresh --releasever=27 --allowerasing
3. sudo dnf system-upgrade reboot

DNF identified circa 5800 packages to update

4. power failure circa 2400 packages
5. multiple attempts to restart upgrade process through step 3.
6. attempted process restart from step 1, did not work
7. sudo dnf system-upgrade clean
8. attempted step 2. failed.

Actual results:

Current output from system as below 
[user-@localhost ~]$ sudo dnf system-upgrade download --releasever=27 --refresh --allowerasing
Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: y
Last metadata expiration check: 0:00:00 ago on Sat 18 Nov 2017 09:42:03 AEDT.
Error: 
 Problem: The operation would result in removing the following protected packages: dnf, sudo, systemd, systemd-udev

Comment 1 Marek Blaha 2017-11-30 13:20:33 UTC
Hi, there is post on dnf team blog about repairing broken system using dnf.

https://rpm-software-management.github.io/page2/

(sorry for inconvenience, we have new blog system and permanent links to posts are not working at the time, just search for title "Repair of broken system with DNF-2.0")

You probably do not need to boot from live cd and upgrade dnf, because fedora 26 already contains required version 2. Basically you can try "dnf check" and see if there are some duplicate packages, which you need to remove.

Comment 2 barsnick 2018-11-17 08:38:35 UTC
I had the same issue upgrading from F27 to F28 using dnf.

This is the scenario which was left behind, which dnf tools weren't able to resolve:

* Both fc27 and fc28 packages were "installed" according to "rpm -qa".
* On disk, some content was still F27, some F28. This could *possibly* be investigated case by case with "rpm -V" (to determine which of the two is already on disk, to purge the other entry from the database).
* It's unclear which packages' %pre / %post scripts had already run.
* No dnf tools were capable of resolving any of this.

So probably an unresolvable situation, unless someone comes up with a method to avoid such a mess at random power failure.

I needed to reinstall, which was a good (but painful) refresh for my system.

Comment 3 Jaroslav Mracek 2018-11-18 13:19:06 UTC
Please can you try "dnf remove --duplicates"? It will automatically try to resolve your issue.

Comment 4 Ben Cotton 2018-11-27 13:32:38 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. 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 '27'.

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 27 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 barsnick 2018-11-27 14:14:52 UTC
(In reply to Jaroslav Mracek from comment #3)
> Please can you try "dnf remove --duplicates"? It will automatically try to
> resolve your issue.

I can't, because I finally reinstalled.

I must point out that none of the fedoraproject.org (and similar) pages covering this topic even mentioned that command.

(This one comes close, I hadn't found it at that time - and I had the same conflicts, and it wasn't obvious to me that I needed to disable a plugin to work around that:

https://forums.fedoraforum.org/showthread.php?314473-dnf-broke-fedora-25-after-crash-during-update
)

Comment 6 Ben Cotton 2019-02-19 17:11:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle.
Changing version to '30.

Comment 7 Jaroslav Mracek 2019-04-12 17:29:12 UTC
I believe that "dnf remove --duplicates" will solve the issue next time. Anyway we will provide additional improvements how to recover the system including a new tools. But the present issue was resolved therefore closing the bug.

Comment 8 Herbert Carl Meyer 2019-10-31 22:29:14 UTC
I have a similar problem, caused by a crash due to system instability during cleanup phase of system upgrade from fedora 30 to 31. The packages were all upgraded, but cleanup did not complete. or post install. the log simply terminates during cleanup, I was not watching.

The system is bootable and usable, with an f30 kernel, no f31 listed at boot time

retrying dnf system-upgrade reboot results in dnf believing the system is upgraded, and hanging at reboot.

dnf system-upgrade download --refresh --releasever=31 results in the problem message about protected packages

dnf remove --duplicates --skip-broken produces a large number of messages about f31 packages like:

installed package efibootmgr-16-6.fc31.x86_64 not available.

with these messages about f30 packages:

Error: 
 Problem 1: package libdnf-0.35.5-4.fc30.x86_64 requires librpm.so.8()(64bit), but none of the providers can be installed
  - package libdnf-0.35.5-4.fc30.x86_64 requires librpmio.so.8()(64bit), but none of the providers can be installed
  - conflicting requests
 Problem 2: problem with installed package yum-4.2.9-5.fc31.noarch
  - package yum-3.4.3-522.fc30.noarch requires python2-gpg, but none of the providers can be installed
  - package yum-3.4.3-521.fc30.noarch requires python2-gpg, but none of the providers can be installed
  - package yum-4.2.9-5.fc31.noarch requires dnf = 4.2.9-5.fc31, but none of the providers can be installed
  - package python2-gpg-1.12.0-1.fc30.x86_64 requires gpgme(x86-64) = 1.12.0-1.fc30, but none of the providers can be installed
  - conflicting requests
 Problem 3: package PackageKit-1.1.12-11.fc31.x86_64 requires libdnf(x86-64) >= 0.22.0, but none of the providers can be installed
  - package PackageKit-1.1.12-11.fc31.x86_64 requires libdnf.so.2()(64bit), but none of the providers can be installed
  - package libdnf-0.35.5-4.fc30.x86_64 requires librpm.so.8()(64bit), but none of the providers can be installed
  - package libdnf-0.35.5-4.fc30.x86_64 requires librpmio.so.8()(64bit), but none of the providers can be installed
  - package rpm-libs-4.14.2.1-4.fc30.1.x86_64 requires rpm = 4.14.2.1-4.fc30.1, but none of the providers can be installed
  - package rpm-libs-4.14.2.1-5.fc30.x86_64 requires rpm = 4.14.2.1-5.fc30, but none of the providers can be installed
  - problem with installed package PackageKit-1.1.12-11.fc31.x86_64
  - conflicting requests

I will read the github about repairing broken system with dnf, and defer nuking the system and re-installing pending any response to this post. Or learning something about dnf.


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