fedora-infra / mirrormanager2

Rewrite of the MirrorManager application in Flask and SQLAlchemy
https://mirrormanager.fedoraproject.org
GNU General Public License v2.0
63 stars 46 forks source link

IPv6-only mirrors and clients are not properly supported #306

Open ott opened 2 years ago

ott commented 2 years ago

mirrorlist does not properly support IPv6-only mirrors and IPv6-only clients. In Europe, most of the time, the returned list seems to be long enough that an IPv6-only client finds at least one mirror that supports IPv6 but there might be parts of the world where it is not the case. Moreover, an IPv6-only mirror might be returned to an IPv4-only client which might be a problem in the future. Even when it works by trying multiple mirrors, time is wasted by DNS resolution, connection attempts and sometimes waiting for timeouts. It would be better if mirrorlist had some awareness of address families. For example, OpenSUSE did solve this issue rudimentarily for their fork of MirrorBrain because they had the same issue.

ott commented 2 years ago

I have a patch in rough working condition that determines whether a host supports IPv4 or IPv6, writes this information into the mirrorlist cache and lets mirrorlist use this information in mirror selection.

However, I thought a bit more about the problem and perhaps its best to let the client choose a mirror based on whether it can reach it or not. So it seems that the root problem is that a truncated mirror list is returned to the client.