Bug 1316288 - transaction rollback failed
Summary: transaction rollback failed
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-09 21:46 UTC by Christopher Beland
Modified: 2016-03-21 13:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-21 13:06:46 UTC
Type: Bug


Attachments (Terms of Use)
Console output from the upgrade and attempted undo. (97.85 KB, text/plain)
2016-03-09 21:46 UTC, Christopher Beland
no flags Details

Description Christopher Beland 2016-03-09 21:46:23 UTC
Created attachment 1134651 [details]
Console output from the upgrade and attempted undo.

dnf-1.1.6-2.fc23.noarch

I did a "dnf update" and installed a large number of packages.  

Unfortunately, the cleanup script for the third-party docker-engine RPM hung on an "rmmod".  I hit control-C, expecting this to abort and roll back the RPM transaction.  Instead, I seem to have ended up with both versions of the RPMs installed at the same time.  For example:

[beland@localhost ~]$ rpm -q docker-engine
docker-engine-1.10.1-1.fc22.x86_64
docker-engine-1.10.2-1.fc22.x86_64
[beland@localhost ~]$ rpm -q sqlite
sqlite-3.10.2-1.fc23.x86_64
sqlite-3.11.0-2.fc23.x86_64


I tried "dnf history undo 129", intending to undo and redo the update without the problematic docker-engine packages, but this failed with the error:

ValueError: NEVRA was already removed: sqlite-0:3.10.2-1.fc23.x86_64

I'm attaching my console output for debugging purposes.

Comment 1 Honza Silhan 2016-03-14 13:10:25 UTC
history undo operates on successful finished transactions. Remove the duplicates first - "dnf remove $(dnf repoquery --duplicated --latest-limit -1 -q)".

Comment 2 Christopher Beland 2016-03-17 15:13:56 UTC
I guess the problem then is that cancelling the operation wasn't transaction-safe.  If it couldn't complete it should have rolled back, right?

I tried that command to recover, but it complains:
Error: The operation would result in removing the following protected packages: systemd, dnf.

Feeding that list of packages to "rpm -e --nodeps" did work.  Thanks for the hint, though!  That definitely saved me a ton of manual cleanup.

Comment 3 Michal Luscon 2016-03-21 13:06:46 UTC
Unfortunately, rpm "transactions" was not designed as a real transactions. Please file an RFE on rpm if you wish to improve their behaviour. To be honest there is probably zero percent chance they will improve it.


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