Greetings, we run openSUSE in our labs. I created a local update repository using rsync off of openSUSE’s rsync server. As I am sure some of you are aware there were problems with that rsync server and our repository was unable to get updated. With the recent flurry concerning Heartbleed we were working quickly to patch our machines. I wound up having to add the update openSUSE’s update repositories to receive the patches. The rsync server appears to be back online now, but now that the dust has abated I had some questions I was hoping you could help me with.
I would prefer to use the local repository to save on bandwidth and time, however, if the rsync server is unavailable this is not a great strategy. Zypper repo priorities appear to concern only preferences for the package revisions. Does zypper traverse the repos in order? My goal would be to have the machines hit our server first, but have the openSUSE update repository as a failsafe.
Is this a good strategy or is there something that I’m overlooking.
Many thanks for your help with this.
On 2014-04-15 19:16, lyapunov wrote:
> I would prefer to use the local repository to save on bandwidth and
> time, however, if the rsync server is unavailable this is not a great
> strategy. Zypper repo priorities appear to concern only preferences for
> the package revisions. Does zypper traverse the repos in order? My goal
> would be to have the machines hit our server first, but have the
> openSUSE update repository as a failsafe.
Huh, no, it does not work that way. Zypper hits them all in some unknown
order. Maybe alphabetical. It is impossible to use alternative servers
if one fails.
The openSUSE main download server is in fact a redirector. When you ask
for a package, it gives you a mirror address instead to download it
from. The next package or file could get a different mirror. It uses
“mirror brain”, IIRC.
If you create your own local redirector, and configure it to verify
first that the mirror it is going to give to zypper actually works,
you’d get that failback feature you want.
There have been requests to the developers to create an automated
yast/zypper/app automated cache proxy, but so far, no response. You can
vote for it:
It would better serve your needs.
Someone (Per Jessen) managed to do it with squid, but it is complex.
Search for the thread “Zypper local proxy / local repo mirror” in the
opensuse mail list archive, this month.
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
I run local partial mirrors at each of our sites. I do not use rsync.opensuse.org, partly because it did not exist when we started, but mostly because it gets overloaded. I have scripts that rsyncs consecutively to two regional mirrors. This is run as a cron job three times a week, or manually via ssh.
The local mirrors are served via http to their LANs, and each machine only connects to the local repository. This setup has been working reliably for more than 14 years. You just need to select suitable mirrors. Speed and availability used to be more important factors than they tend to be now. Make sure that the second regional mirror you connect to is updated at least as frequently as the first, otherwise there is the risk of updating from one mirror and then wiping the update with the second.
Thank you both for your replies. I’m glad to know that I wasn’t the only one that couldn’t figure out the order in which the repos are hit.
I believe I will try the second suggestion, but in the interim I will vote for the proxy.
Thanks again for all your help.