[CentOS-mirror] New Mirror In Brazil

Sat Jul 12 13:09:11 UTC 2014
Fabian Arrotin <fabian.arrotin at arrfab.net>

On 11/07/14 18:14, Pedro Alves wrote:
> **Dear Fabian,
> 
> When i should expect to reach my own mirror when using yum from linux...
> 
> [root at sf /]# yum clean plugins
> Loaded plugins: fastestmirror, refresh-packagekit
> *Cleaning repos: base epel extras rpmforge updates*
> Cleaning up list of fastest mirrors
> 
> [root at sf /]# yum provides netstat
> Loaded plugins: fastestmirror, refresh-packagekit
> *Determining fastest mirrors**
> ** * base: mirror.globo.com ------> i was expecting to reach my own 
> server here*
>   * epel: mirror.globo.com
>   * extras: mirror.globo.com
>   * rpmforge: ftp.is.co.za
>   * updates: mirror.globo.com
> Warning: 3.0.x versions of yum would erroneously match against filenames.
>   You can use "*/netstat" and/or "*bin/netstat" to get that behaviour
> No Matches found
> 
> Pedro Alves

Hi Pedro,

Well, the mirrorlist process/crawler produces lists of current mirrors
which are up2date for specific countries (and
http://mirror-status.centos.org shows almost completely - not release
per release - the status)
What's happening on the client side is the following : yum get a list
from one of the mirrorlist servers, and you can yourself query for that
status from your machine :
curl 'http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&cc=br'
(not the cc=br to specify br, which is automatic due to the GeoIP dns
backend we use)
Now, you will pick one of these mirrors, and normally the fastest one ,
when combined with yum-plugin-fastestmirror (but not that it's *not*
always the more accurate result ...)

So, if you want to *always* use your mirror, two possibilities:
- you use your favorite configuration management solution (puppet,
ansible, chef, and so on ...) to configure your systems to always point
to your local mirror.
- you "cheat" at the dns level (assuming you have control on that in
your network) to redirect mirrorlist.centos.org to a httpd instance
always returning your local mirror as the unique mirror (can be done
with a 10 lines php script) and so redirect all machines directly to
that mirror without any needed action on each provisioned machine.

Please also note that it would be probably  better to speak about such
workarounds on the main CentOS list, and not the mirror one ;-)

Cheers,

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