| Summary: | "RPMDB altered outside of yum" all the time after history transaction from future | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jason Tibbitts <j> |
| Component: | yum | Assignee: | Fedora Packaging Toolset Team <packaging-team> |
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | ffesti, james.antill, lsof, maxamillion, pmatilai, tla, zpavlas |
| 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: | 2012-08-07 17:59:38 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Jason Tibbitts
2011-10-12 21:27:26 UTC
After more investigation, I'd hazard a guess that this is related to the fact that when I installed the system, the clock was several hours off. After installing chrony and letting it skew the clock back, the system is back in shape but yum probably doesn't like seeing dates in the future. I'll check again tomorrow and if it's cleared up then I'll close NOTABUG. Yeh, so the problem is that yum orders the history transactions by the start time of the transactions ... and then takes the "newest" as the last transaction, taking the rpmdb version from that. So if your clock is massively in the future for one transaction, that'll always be the "newest" ... and thus. the rpmdb version will always be compared against it ... and always fail. Blah. We should probably do something better here, I just didn't want to rely on the assumption that the history tids would always go up ... but that probably seems better than this. Try this patch:
commit 5411c80ee0ab81a4f8160950019ef32444557efc
Author: James Antill <james>
Date: Thu Oct 13 10:35:05 2011 -0400
Ignore time skew by using sqlite IDs instead to order transactions. BZ 74563
diff --git a/yum/history.py b/yum/history.py
index 8e62f50..0dc28c3 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -1204,7 +1204,7 @@ class YumHistory:
if tids and len(tids) <= yum.constants.PATTERNS_INDEXED_MAX:
params = tids = list(set(tids))
sql += " WHERE tid IN (%s)" % ", ".join(['?'] * len(tids))
- sql += " ORDER BY beg_ts DESC, tid ASC"
+ sql += " ORDER BY tid DESC"
if limit is not None:
sql += " LIMIT " + str(limit)
executeSQL(cur, sql, params)
Of course, now reality has caught up to where my clock was set and the errors have gone away. Let me set up a test machine at work and skew the clock around a bit. 2011-05-05 Run yum transaction with wrong date. (fix date) 2011-01-01 Run yum transaction. Would it be possible for the second yum transaction to notice the error so that it's not displayed again? This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. This message is a notice that Fedora 15 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 15. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '15' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 15 reached 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 to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. 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. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping |