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
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:
Author: James Antill <email@example.com>
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
@@ -1114,10 +1114,12 @@ def decompress(filename, dest=None, fn_only=False, check
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:
_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).
Added the James's upstream patch.
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.
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.