[CentOS-mirror] Wrong mirrors returned by http://mirrorlist.centos.org/

Thu Jul 17 10:15:49 UTC 2014
Fabian Arrotin <fabian.arrotin at arrfab.net>

On 17/07/14 10:28, Mark Karpeles wrote:
> Hi,
> 
> We are installing CentOS on various servers, however we only receive
> Chinese mirrors with seriously low bandwidth (actually download hangs
> after a few MB) while we are located in Japan.
> 
> # curl 'http://mirrorlist.centos.org/?release=6.5&arch=x86_64&repo=os'
> http://mirrors.hustunique.com/centos/6.5/os/x86_64/
> http://mirrors.hust.edu.cn/centos/6.5/os/x86_64/
> http://mirrors.aliyun.com/centos/6.5/os/x86_64/
> http://mirrors.yun-idc.com/centos/6.5/os/x86_64/
> http://mirrors.btte.net/centos/6.5/os/x86_64/
> http://centos.ustc.edu.cn/centos/6.5/os/x86_64/
> http://mirrors.skyshe.cn/centos/6.5/os/x86_64/
> http://mirrors.stuhome.net/centos/6.5/os/x86_64/
> http://ftp.stust.edu.tw/pub/Linux/CentOS/6.5/os/x86_64/
> http://ftp.tc.edu.tw/Linux/CentOS/6.5/os/x86_64

Well, I just checked here :
http://mirrorlist.centos.org/?release=6.5&arch=x86_64&repo=os&cc=jp
and the list :
http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.5/os/x86_64/
http://ftp.tsukuba.wide.ad.jp/Linux/centos/6.5/os/x86_64/
http://www.ftp.ne.jp/Linux/packages/CentOS/6.5/os/x86_64/
http://ftp.jaist.ac.jp/pub/Linux/CentOS/6.5/os/x86_64/
http://ftp.iij.ad.jp/pub/linux/centos/6.5/os/x86_64/
http://mirror.fairway.ne.jp/centos/6.5/os/x86_64/
http://ftp.riken.jp/Linux/centos/6.5/os/x86_64/
http://centos.mirror.secureax.com/6.5/os/x86_64/
http://mirrors.aliyun.com/centos/6.5/os/x86_64/
http://mirrors.stuhome.net/centos/6.5/os/x86_64/

> 
> We are doing queries from IP range 118.27.0.0/16. Sometimes we get
> some Japanese mirrors in the list (and those are really fast), but
> sometimes there is not even a single one.
> 
> For information China usually has very bad bandwidth to other
> countries (the case for many Asian countries actually), as such
> Chinese mirrors are not suitable for hosts located in Japan (and the
> other way around).
> 
> Anyway I'm not sure how mirrorlist.centos.org works, but anyway I hope
> this issue can be solved one way or another.

The mirrorlist process checks the incoming IP and queries the GeoIP.dat
database (geolite from Maxmind) and then verify the actual list of valid
mirrors for that country : if not enough mirrors in that country are
available, the mirrorlist script adds several mirrors from a nearby country.

In that specific .jp/.cn case, we can eventually select another "nearby"
country and not using .cn at all, but that's something to discuss before
implemeting it.
Also, the current situation seems correct, can you confirm ?

> 
> Thanks,
> Mark

Cheers,
-- 
Fabian Arrotin
gpg key: 56BEC54E | twitter: @arrfab