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:
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
--
Matt Domsch
Technology Strategist
Dell | Office of the CTO