Bug 967885

Summary: yum load-transaction gives rpmdb ver mismatch loading saved transaction
Product: [Fedora] Fedora Reporter: John Sullivan <jsrhbz>
Component: yumAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: admiller, ffesti, firas.alkafri, jzeleny, packaging-team-maint, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 21:34:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Sullivan 2013-05-28 13:36:15 UTC
Description of problem:

A recent "yum update" threw the same dep conflict on two separate machines with very different life histories. The conflict itself was easy enough to fix, but what this is about is the apparently new "load-transaction" feature:

# yum update
[...]
Downloading Packages:
Running Transaction Check
ERROR with transaction check vs depsolve:
[...]
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2013-05-28.13-19.vw37ZA.yumtx

# fix dependency problem

# yum load-transaction /tmp/yum_save_tx.2013-05-28.13-19.vw37ZA.yumtx
Loaded plugins: auto-update-debuginfo, fastestmirror, presto, priorities, refresh-packagekit
Error: rpmdb ver mismatched saved transaction version, aborting.
#

Doing an "rm -f /var/lib/rpm/__db* ; rpm --rebuilddb", either before the "yum load-transaction", or before the "yum update" that writes the transaction file itself, doesn't appear to fix this problem. Just re-running the "yum update" did work, but this saved transaction feature doesn't.


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

Thu 02 May 2013 13:40:14 BST  	yum-plugin-fastestmirror-1.1.31-10.fc18.noarch
Wed 01 May 2013 21:57:29 BST  	rpm-4.10.3.1-1.fc18.x86_64
Wed 01 May 2013 22:00:24 BST  	python-deltarpm-3.6-0.11.20110223git.fc18.x86_64
Wed 01 May 2013 21:57:40 BST  	deltarpm-3.6-0.11.20110223git.fc18.x86_64
Thu 02 May 2013 13:41:12 BST  	yum-plugin-auto-update-debug-info-1.1.31-10.fc18.noarch
Wed 01 May 2013 22:07:39 BST  	yum-utils-1.1.31-10.fc18.noarch
Thu 02 May 2013 13:46:03 BST  	yum-plugin-priorities-1.1.31-10.fc18.noarch
Thu 02 May 2013 15:44:52 BST  	PackageKit-yum-plugin-0.8.7-1.fc18.x86_64
Thu 02 May 2013 15:31:13 BST  	yum-updatesd-0.9-13.fc18.noarch
Thu 02 May 2013 15:30:49 BST  	yum-presto-0.9.0-1.fc18.noarch
Wed 01 May 2013 21:57:28 BST  	rpm-libs-4.10.3.1-1.fc18.x86_64
Wed 01 May 2013 22:07:36 BST  	yum-3.4.3-54.fc18.noarch
Wed 01 May 2013 22:07:38 BST  	anaconda-yum-plugins-1.0-8.fc18.noarch
Wed 01 May 2013 22:07:35 BST  	rpm-build-4.10.3.1-1.fc18.x86_64
Wed 01 May 2013 22:07:33 BST  	rpm-python-4.10.3.1-1.fc18.x86_64
Wed 01 May 2013 22:07:32 BST  	rpm-build-libs-4.10.3.1-1.fc18.x86_64
Wed 01 May 2013 21:57:06 BST  	yum-metadata-parser-1.1.4-7.fc18.x86_64
Thu 02 May 2013 15:38:58 BST  	PackageKit-yum-0.8.7-1.fc18.x86_64

(Note: none of these packages were part of the failing update transaction. The installed versions were stable throughout.)

How reproducible:

Apparently always, assuming you can trigger a transaction failure by some other means.

Steps to Reproduce:
1. Run a failing "yum update"
2. Fix the underlying problem.
3. Obey yum's direction to restart with "yum load-transaction"

Actual results:

A transaction that has only just been saved fails to load with an rpmdb version mismatch error.

Expected results:

Yum should create save files that can actually be loaded. If there is some reason why that can't be done, then it should not create them in the first place, and should not tell you to do something which won't work.

Comment 1 John Sullivan 2013-05-28 14:29:08 UTC
# head -1 /tmp/yum_save_tx.2013-05-28.13-19.vw37ZA.yumtx
4780:5cb6f321e48eedf4001cf3e121a7cdaa762e74cd

That string comes from ...site_packages/yum/__init__.py, via save_ts/load_ts:

$ python
Python 2.7.3 (default, Aug  9 2012, 17:23:57) 
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
>>> i = yum.YumBase()
>>> j = i.rpmdb.simpleVersion(main_only=True)
Loaded plugins: auto-update-debuginfo, fastestmirror, presto, priorities,
              : refresh-packagekit
>>> print j
['4780:39e2d558f43a947cec2004d8a706d492358a51d8', {}]
>>> 

load_ts requires that the current value of simpleVersion[0] matches the value retrieved when save_ts was called.

What is that hash value and when does it change? On any rpm operation? If so, it seems that fixing a dep problem (usually by removing conflicting packages, as in this case) must *guarantee* that the load check will fail, which doesn't sound too useful.

Comment 2 Fedora End Of Life 2013-12-21 13:46:03 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 WONTFIX if it remains open with a Fedora 
'version' of '18'.

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 prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 to Fedora 18's end of life.

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 3 Fedora End Of Life 2014-02-05 21:34:45 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.