[opensuse] round robin dns for the repo mirrors



grr, heads up, ran into a nice little glitch in the whole dns load balancing scheme for the repo mirrors.

At least some of the hostnames don't actually point to a server but to a dns loadbalancer that selects from a pool of physical servers. You get whatever you get, unless you want to start using IP's.

The problem is, at least sometimes, the different physical hosts _don't have the same contents_ as each other.
This royally screwed up an rsync mirror script I have which TRIES to be careful and test for the existence of the target dir before performing a potentially destructive rsync from it.
In the past I had whole sets of my local repos deleted when they dissappeared off the remote servers.
So, I added a check to my script, instead of just rsyncing, check if it's still there first, then rsync for real only after verifying that it's still there.

That kind of all blows up if I test a directory on mirrors.kernel.org and it's THERE, and then I do a real rsync to the same exact host/path, only this time I got a different IP and the directory is NOT THERE.
What the heck can you even DO in that case? Even removing --del from my rsync options doesn't solve it.
My repo's getting cluttered up with old files I could live with, but if I never know if the index files (whose filenames don't change as updates are applied) are some old copy from an out of date host or a current copy at any given moment, depending on the luck of the draw the last time the mirror script ran.

The exact example I noticed just now was I was working on the mirror script and using 10.2/oss as a test case for a repo that has dissappeared off most servers. I was trying to get it so that when 10.3 goes away, my script notices it and doesn't wipe out my local copy that day.

When I run this test, it alternates every other time, pass, fail, pass, fail, ...

tst () { rsync -qn rsync://${1}/ >/dev/null 2>&1 && echo yes || echo no ; }
X="mirrors.kernel.org/mirrors/opensuse/distribution/10.2/repo/oss"

tst $X
yes
tst $X
no
tst $X
yes
tst $X
no

If I ping -c 1 mirrors.kernel.org repeatedly, it flip flops between two different ips, which explains everything.

That might explain Davids mystery with that X11/ati repo the other day too.

I'm glad I noticed this before 10.3 disappears, because obviously even a good simple empirical test like this isn't useful and my stuff would have been deleted anyways. Which would have been highly..something, annoying or frustrating arent strong enough words.

--
Brian K. White brian@xxxxxxxxx http://profile.to/KEYofR
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx