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
Status: VERIFIED NEEDINFO
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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: ---


Attachments

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
(rsync.europe.gentoo.org) 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 people.apache.org:

-bash-2.05b$ ping rsync.europe.gentoo.org
PING rsync.europe.gentoo.org (193.190.198.20): 56 data bytes

-bash-2.05b$ ping rsync.europe.gentoo.org
PING rsync.europe.gentoo.org (147.32.127.222): 56 data bytes

These two were performed at our site:

$ ping rsync.europe.gentoo.org
PING rsync.europe.gentoo.org (195.86.128.57): 56 data bytes

$ ping rsync.europe.gentoo.org
PING rsync.europe.gentoo.org (195.86.128.57): 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