Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
In very rare cases, the yum utility may have incorrectly kept using old updateinfo, pkgtags, and groups metadata. When this happened, users may have been unaware of available updates for up to 6 hours. This update applies a patch that prevents yum from using outdated metadata, resolving this issue.
Description of problem:
There is a slight window where we can keep old cached updateinfo (and groups/pkgtags ... although it's really hard to have any problems there), when repodata updates due to:
i. yum blah => get repomd (including updateinfo.xml.gz)
ii. server updates updateinfo.xml etc.
iii. yum updateinfo => convert updateinfo.xml.gz to updateinfo.xml
iv. yum blah => get new repomd
v. yum update --security => still using the old updateinfo.xml because
#iii is "newer" than #ii.
...given that the timestamps on RHN seem to be identical between
updateinfo and primary, that means that there is a ~6 hour window
between RHN putting new repodata out and a client not seeing until the
next time the repodata is changed in RHN (or the client manually cleans
the data).
Now that probably sounds worse than it is because:
a. AFAIK it's not easy to do #i (get updateinfo.xml.gz without
converting it to updateinfo.xml). Manually changing the mdpolicy is the
only way I know, in yum ... rhn_check has open bugs about recent
versions downloading all repodata, but I don't think that is live.
b. If you don't have the updateinfo.xml.gz ... then AIUI RHN doesn't
keep old copies of repodata around, so yum will try and fetch "the
latest" and be given a 404 ... and then won't even get to step #2. At
which point the user can "yum clean expire-cache" or whatever and will
get the actual latest versions.
...here is the upstream patch:
commit 222e44bbb3d96f0f6d4f61766c0f31f03c0496b9
Author: James Antill <james>
Date: Wed Aug 24 17:03:58 2011 -0400
Fix problems with using old generated data (groups/pkgtag/updateinfo).
diff --git a/yum/misc.py b/yum/misc.py
index 37c572b..04490a6 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -1114,10 +1114,12 @@ def decompress(filename, dest=None, fn_only=False, check
if check_timestamps:
fi = stat_f(filename)
fo = stat_f(out)
- if fi and fo and fo.st_mtime > fi.st_mtime:
+ if fi and fo and fo.st_mtime == fi.st_mtime:
return out
_decompress_chunked(filename, out, ztype)
+ if check_timestamps and fi:
+ os.utime(out, (fi.st_mtime, fi.st_mtime))
Also as a great "outside yum" test you can do:
gzip -dc /var/cache/yum/path/to/repo/updateinfo.xml.gz > /tmp/abcd
cmp /var/cache/yum/path/to/repo/gen/updateinfo.xml /tmp/abcd
...and after a "yum updateinfo" command that should always match (ie. files cmp as identical).
Comment 12Jaromir Hradilek
2011-10-26 15:28:36 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
In very rare cases, the yum utility may have incorrectly kept using old updateinfo, pkgtags, and groups metadata. When this happened, users may have been unaware of available updates for up to 6 hours. This update applies a patch that prevents yum from using outdated metadata, resolving this issue.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2011-1702.html
Description of problem: There is a slight window where we can keep old cached updateinfo (and groups/pkgtags ... although it's really hard to have any problems there), when repodata updates due to: i. yum blah => get repomd (including updateinfo.xml.gz) ii. server updates updateinfo.xml etc. iii. yum updateinfo => convert updateinfo.xml.gz to updateinfo.xml iv. yum blah => get new repomd v. yum update --security => still using the old updateinfo.xml because #iii is "newer" than #ii. ...given that the timestamps on RHN seem to be identical between updateinfo and primary, that means that there is a ~6 hour window between RHN putting new repodata out and a client not seeing until the next time the repodata is changed in RHN (or the client manually cleans the data). Now that probably sounds worse than it is because: a. AFAIK it's not easy to do #i (get updateinfo.xml.gz without converting it to updateinfo.xml). Manually changing the mdpolicy is the only way I know, in yum ... rhn_check has open bugs about recent versions downloading all repodata, but I don't think that is live. b. If you don't have the updateinfo.xml.gz ... then AIUI RHN doesn't keep old copies of repodata around, so yum will try and fetch "the latest" and be given a 404 ... and then won't even get to step #2. At which point the user can "yum clean expire-cache" or whatever and will get the actual latest versions. ...here is the upstream patch: commit 222e44bbb3d96f0f6d4f61766c0f31f03c0496b9 Author: James Antill <james> Date: Wed Aug 24 17:03:58 2011 -0400 Fix problems with using old generated data (groups/pkgtag/updateinfo). diff --git a/yum/misc.py b/yum/misc.py index 37c572b..04490a6 100644 --- a/yum/misc.py +++ b/yum/misc.py @@ -1114,10 +1114,12 @@ def decompress(filename, dest=None, fn_only=False, check if check_timestamps: fi = stat_f(filename) fo = stat_f(out) - if fi and fo and fo.st_mtime > fi.st_mtime: + if fi and fo and fo.st_mtime == fi.st_mtime: return out _decompress_chunked(filename, out, ztype) + if check_timestamps and fi: + os.utime(out, (fi.st_mtime, fi.st_mtime))