Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94644 - emerge --sync should do random DNS roundrobin
Summary: emerge --sync should do random DNS roundrobin
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Infrastructure
Depends on:
Reported: 2005-05-31 10:48 UTC by Ortwin Glueck
Modified: 2005-06-01 05:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Ortwin Glueck 2005-05-31 10:48:54 UTC
Even though I have selected a roundrobin DNS name for SYNC
( emerge --sync always tries them in the same order. So
if I happen to get a real slow server it does NOT help to restart emerge --sync
to get a different one.

I don't know what has changed. But this has worked in the past. Now it is broken.

Reproducible: Always
Steps to Reproduce:
1. emerge --sync
2. look at the server it picked
3. ctrl-c
4. emerge --sync

Actual Results:  
it will pick the same server again and again

Expected Results:  
it should pick a different server every time
Comment 1 SpanKY gentoo-dev 2005-05-31 10:53:13 UTC
the 'randomness' that comes from round robin dns comes from the layers below portage

portage itself should not (and does not) care about the info given to it

in other words you're gonna have to invesigate your system and see what has
changed on it such that the order is given back the same everytime
Comment 2 Kurt Lieber (RETIRED) gentoo-dev 2005-05-31 11:30:00 UTC
Also, this is the expected behavior of DNS.  When you issue a DNS query against
a round robin A record, it returns all results.  Your DNS client picks one and
caches it based on the associated TTL of the record.  It will continue to use
that  record until a point where the TTL expires.
Comment 3 Ortwin Glueck 2005-06-01 00:25:08 UTC
Kurt, no a DNS client should be aware of round robin and issue a different IP on
every request. You can check this with two consecutive pings. These two were
performed on

-bash-2.05b$ ping
PING ( 56 data bytes

-bash-2.05b$ ping
PING ( 56 data bytes

These two were performed at our site:

$ ping
PING ( 56 data bytes

$ ping
PING ( 56 data bytes

So it is a local DNS cache problem of our site DNS server.
Comment 4 SpanKY gentoo-dev 2005-06-01 05:41:55 UTC
i guess it depends on your definition of 'dns client' ... ping uses glibc for
resolving names and (afaik) so does python