[mirror-admin] Only Private Mirror is showing up in the mirror list.

Matt Domsch matt at domsch.com
Sun Dec 22 16:10:25 EST 2013


Upon even further reflection, it is indeed a bug, and I have now fixed it
in MM upstream, and in FI production.  The fix should be evident within a
few hours.

commit b4d6a13208c37db15158876606530bd33eb0d1b7
Author: Matt Domsch <matt at domsch.com>
Date:   Sun Dec 22 14:10:13 2013 -0600

    default directories to ordered_mirrorlist = True

    Reported by two private mirror operators on mirror-list-d and
    privately, mirror operators using metalinks were getting _only_ their
    mirror returned in the metalink, not theirs, plus several fallbacks.
    When their mirrors then were not working or not up-to-date or not
    reachable, yum would fail because there were no more mirrors to try.

    Complicating things, when viewed using mirrorlist/ rather than
    metalink/, mirrorlist returned a long list, while metalink didn't.

    The proximate cause is that mirrorlist/ looks at Repository pointers
    into a directory, where the ordered_mirrorlist=True value is set on
    the corresponding Version object for that Repository.  However,
    metalink/ was looking one directory deeper, at the repodata/
    directory, which was _never_ being treated as
    ordered_mirrorlist=True.  This causes the path through
    mirrorlist_server.py:do_mirrorlist() to take the !ordered_mirrorlist
    path, which was intended only for long-obsolete product Versions

    We should delete the whole !ordered_mirrorlist codepath, but won't do
    so at this time.

    Instead, we'll solve the immediate problem with the smallest possible
    change, default ordered_mirrorlist=True for all directories, and only
    historical (non-metalink-using) Versions may set it to False.

diff --git a/server/mirrormanager/mirrorlist.py
b/server/mirrormanager/mirrorlist.py
index e67c9c2..3618c39 100644
--- a/server/mirrormanager/mirrorlist.py
+++ b/server/mirrormanager/mirrorlist.py
@@ -124,7 +124,7 @@ def populate_directory_cache():
             continue

         if directoryname not in cache:
-            cache[directoryname] = {'global':set(), 'byCountry':{},
'byHostId':{}, 'ordered_mirrorlist':False, 'byCountryInternet2':{}}
+            cache[directoryname] = {'global':set(), 'byCountry':{},
'byHostId':{}, 'ordered_mirrorlist':True, 'byCountryInternet2':{}}

             repo = directory_repo_cache.get(directory_id)



On Sat, Dec 21, 2013 at 3:15 PM, Matt Domsch <matt at domsch.com> wrote:

> This is actually working as designed, though I think the design is
> flawed.  :)  Private mirrors for a netblock get presented, if MM thinks
> they have the requested content and are up to date.  The rest of the list
> then isn't presented.  However, if that mirror turns out to not be working
> or reachable or not up to date, there are no fallbacks to use.
>
> I will consider a proper fix to the design and then implementation but
> wont rush to fix it as if it were a newly introduced bug.
> On Dec 21, 2013 8:00 AM, "Matt Domsch" <matt at domsch.com> wrote:
>
>> There's some bug related to metalinks specifically (which is what yum is
>> using). I likely introduced it with the MM 1.4.3 upgrade this week.  This
>> is the second report of failure, and I can clearly see that metalinks only
>> are returning a single mirror for some users, while mirrorlist returns the
>> whole list as expected.   It looks to be only for hosts that fall within a
>> netblock of a private mirror.
>>
>> I am travelling with my family today, so offline mostly.  I'll look at it
>> and resolve ASAP.
>>
>> Thanks,
>> Matt
>>
>>
>> On Fri, Dec 20, 2013 at 7:09 PM, Albert Wang <wang at polymathanalytics.com>wrote:
>>
>>> Hi everyone,
>>>
>>> Sorry if I'm sending the question to the wrong mailing list, but I'm
>>> hoping someone can help me with my problem:
>>>
>>> I have a for-home private repository that I set up, which contains most,
>>> but not all the rpm packages, for quicker updates.
>>> It has been working fine until a week or so ago, where, essentially, the
>>> call:
>>> curl -s "
>>> https://mirrors.fedoraproject.org/metalink?repo=updates-released-f19&arch=x86_64&ip=98.113.159.63
>>> "
>>>
>>> now only returns one private repo site (without the full list of other
>>> alternatives). This causes problems, since I filtered out certain devel
>>> packages.
>>> Is there a policy/implementation change that I am not aware of?
>>>
>>> Thank you very much for your time. Happy holidays!
>>> Albert
>>>
>>>
>>>
>>> --
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/mirror-admin/attachments/20131222/84ff5e80/attachment.html>
-------------- next part --------------
--


More information about the Mirror-admin mailing list