Bug 1316288 - transaction rollback failed
transaction rollback failed
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-09 16:46 EST by Christopher Beland
Modified: 2016-03-21 09:06 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-21 09:06:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Christopher Beland 2016-03-09 16:46:23 EST
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 09:10:25 EDT
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 11:13:56 EDT
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 09:06:46 EDT
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.