Red Hat Bugzilla – Bug 1316288
transaction rollback failed
Last modified: 2016-03-21 09:06:46 EDT
Created attachment 1134651 [details]
Console output from the upgrade and attempted undo.
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
[beland@localhost ~]$ rpm -q sqlite
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.
history undo operates on successful finished transactions. Remove the duplicates first - "dnf remove $(dnf repoquery --duplicated --latest-limit -1 -q)".
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.
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.