| View previous topic :: View next topic |
| Author |
Message |
kipibenkipod n00b


Joined: 15 Apr 2010 Posts: 51 Location: Israel
|
Posted: Thu Apr 15, 2010 8:16 am Post subject: Multiple SYNC sources in make.conf |
|
|
Hi,
I would like to use two sync sources in make.conf like this:
| Code: | | SYNC="rsync://MYLOCASERVER/gentoo-portage rsync://PUBLICSERVER/gentoo-portage/" |
This setup don't work if MYLOCALSERVER is down. It will just abort after 3 tries, and will not try to use PUBLICSERVER.
Why there is no support for redundant SYNC mirrors?
Regards,
Kfir |
|
| Back to top |
|
 |
John R. Graham Administrator


Joined: 08 Mar 2005 Posts: 4849 Location: Somewhere over Atlanta, Georgia
|
Posted: Thu Apr 15, 2010 10:41 am Post subject: |
|
|
It's true that Portage doesn't support fallback sync servers. I don't know why. However, if you're not averse to a little scripting, this is trivial to correct: | my_sync.sh: | #!/bin/bash
if ! SYNC="rsync://local_server_uri_or_ip" emerge --sync ; then
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" emerge --sync
fi | - John _________________ Yoda: "Intentionally left blank, this space is." |
|
| Back to top |
|
 |
d2_racing Moderator


Joined: 25 Apr 2005 Posts: 12867 Location: Ste-Foy,Canada
|
Posted: Thu Apr 15, 2010 12:08 pm Post subject: |
|
|
Indeed, I found that one too lately. _________________ Sysadmin of Funtoo-Québec.org
Wiki
Signature
IRC on Freenode : #funtoo-quebec |
|
| Back to top |
|
 |
kipibenkipod n00b


Joined: 15 Apr 2010 Posts: 51 Location: Israel
|
Posted: Thu Apr 15, 2010 12:20 pm Post subject: |
|
|
| John R. Graham wrote: | It's true that Portage doesn't support fallback sync servers. I don't know why. However, if you're not averse to a little scripting, this is trivial to correct: | my_sync.sh: | #!/bin/bash
if ! SYNC="rsync://local_server_uri_or_ip" emerge --sync ; then
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" emerge --sync
fi | - John |
Ok thanks,
I did this in my sync script:
| Code: |
SYNC_SERVERS="rsync://HOME/gentoo-portage rsync://FIRST_INTERNET_SERVER/gentoo-portage/ rsync://SECOND_INTERNET_SERVER/gentoo-portage/"
for server in $SYNC_SERVERS
do
SYNC="$server" eix-sync -q && break
done
|
Thanks for your help.
Now I would like to know, why there are no redundant sync servers in make.conf
Thanks,
Kfir |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8690 Location: beyond the rim
|
Posted: Thu Apr 15, 2010 2:37 pm Post subject: |
|
|
| Because so far noone had a need for it, most people are happy with the round-robin DNS solution. |
|
| Back to top |
|
 |
kipibenkipod n00b


Joined: 15 Apr 2010 Posts: 51 Location: Israel
|
Posted: Thu Apr 15, 2010 6:31 pm Post subject: |
|
|
| Genone wrote: | | Because so far noone had a need for it, most people are happy with the round-robin DNS solution. |
How does the DNS solution work? |
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8690 Location: beyond the rim
|
Posted: Thu Apr 15, 2010 10:18 pm Post subject: |
|
|
| The rsync.*.gentoo.org entries are actually groups of servers, so if one goes down you're just redirected to another one transparently. Of course that doesn't work if you want to use a private mirror as primary source. |
|
| Back to top |
|
 |
Timmer Guru

Joined: 24 Aug 2004 Posts: 309 Location: Bloomington, IN, USA
|
Posted: Wed Aug 11, 2010 10:44 pm Post subject: |
|
|
Is there a bug for this yet to vote for?
I have my desktop set up as a private rsync for my laptop, but then if I'm not home (on vacation, for example), i can't sync to my home server. It's got a different address in the outside world. This would be a useful feature. |
|
| Back to top |
|
 |
cappellaiomatto n00b

Joined: 04 Sep 2010 Posts: 5
|
Posted: Sat Sep 04, 2010 5:59 pm Post subject: |
|
|
Actually there are two bug reports: the first is about the documentation that incorrectly reported that was possible to specify multiple servers in the SYNC variable (maybe in the beginning it was allowed) bug 43778
The second is more relevant, but the poster missed the point, and it was closed as invalid: bug 159740
There are other places where this idea is stressed: http://gentoo-what-did-you-say.blogspot.com/2010/04/multiple-portage-sync-servers.html.
Gentoo users are encouraged to set up their own rsync mirror, but there isn't a trivial way to specify a fall-back for sync mirrors... |
|
| Back to top |
|
 |
someone19 n00b

Joined: 26 Sep 2006 Posts: 51
|
Posted: Sun Sep 05, 2010 2:25 am Post subject: |
|
|
| Timmer wrote: | Is there a bug for this yet to vote for?
I have my desktop set up as a private rsync for my laptop, but then if I'm not home (on vacation, for example), i can't sync to my home server. It's got a different address in the outside world. This would be a useful feature. |
My solution is this - My home router is also an rsync server, and I use dnsmasq as my DNS forwarding to local clients.
The laptop make.conf is set to rsync.us.gentoo.org, and dnsmasq.conf has
| Code: | | address=/rsync.gentoo.org/192.168.9.1 |
When I'm home all the gentoo machines hit the local mirror for the tree, when I'm remote it hits the normal round-robbin list of servers.
Similar can be done with a re-direct depending on your home network setup. |
|
| Back to top |
|
 |
cappellaiomatto n00b

Joined: 04 Sep 2010 Posts: 5
|
Posted: Sun Sep 05, 2010 9:15 am Post subject: |
|
|
| someone19 wrote: |
My solution is this - My home router is also an rsync server, and I use dnsmasq as my DNS forwarding to local clients.
The laptop make.conf is set to rsync.us.gentoo.org, and dnsmasq.conf has
| Code: | | address=/rsync.gentoo.org/192.168.9.1 |
When I'm home all the gentoo machines hit the local mirror for the tree, when I'm remote it hits the normal round-robbin list of servers.
Similar can be done with a re-direct depending on your home network setup. |
This solution is really neat, no rsync errors, no actual fall-back.
It is really far better than a client-side script, everything is managed server-side in a transparent way.
I'm already testing it!
BTW IIUC it should be
| Code: | | address=/us.gentoo.org/192.168.9.1 |
or
| Code: | | address=/rsync.us.gentoo.org/192.168.9.1 |
otherwise the client requests won't be intercepted. |
|
| Back to top |
|
 |
|