https://fedorahosted.org/fedora-infrastructure/ticket/3268 notes that a mirror might not be removed from the list even though it's stale.
In particular, there is a code path called add_parents() whose job it is to mark all parent directories of a target directory up-to-date or not, if those parent directories had not already been determined to be up-to-date for themselves. This can happen if a directory has no files in it, for example, only child directories. This code path had an incorrect key lookup, specifically:
- parent = '/'.join(splitpath[:-1]) - try: - hcd = host_category_dirs[(hc, parent)]
which was looking up the parent directory in the host_category_dirs cache (which is later operated on). However, the actual key here is not a the string form of the parent directory name, it is a Directory object. So it's looking up the wrong thing, failing the lookup, and then proceeding to mark all its parent directories up-to-date incorrectly. In particular, it is marking all parent directories up-to-date (e.g. pub/epel/5/i386) when a child subdirectory (pub/epel/5/i386/repoview/layout) is marked up-to-date, even if the parent directory is not in fact up-to-date.
The patch below fixes this by splitting out the parent directory lookup function into its own function for readability, and fixes the key lookup.
I've tested this on bapp02 against a stale mirror that was previously marked up-to-date incorrectly, and it fixes it.
I'd like to hotfix bapp02 to address this.
Thanks, Matt
On 11 May 2012 19:51, Matt Domsch Matt_Domsch@dell.com wrote:
https://fedorahosted.org/fedora-infrastructure/ticket/3268 notes that a mirror might not be removed from the list even though it's stale.
+1 Smooge
On Sat, May 12, 2012 at 07:35:04AM -0600, Stephen John Smoogen wrote:
On 11 May 2012 19:51, Matt Domsch Matt_Domsch@dell.com wrote:
https://fedorahosted.org/fedora-infrastructure/ticket/3268 notes that a mirror might not be removed from the list even though it's stale.
+1 Smooge
+1
-Toshio
infrastructure@lists.fedoraproject.org