On Thu, 2018-01-11 at 22:15 +0000, RW wrote:
> On Thu, 11 Jan 2018 09:46:24 -0600
> David Jones wrote:
> 
> 
> > I bet most mirrors have a cron entry like "*/10" ... If we still
> > see
> > problems I can extend the delay some more.
> 
> But the point of a longer delay is that it gives rsync a guaranteed
> minimum head start on the DNS. It doesn't rely on behaviour that
> works today but might fail in 5 years time when everyone's forgotten
> why the delay was needed.
> 
Relying on some fixed time offset like this is problematic because it
can be upset by network failures or slowdowns as well as unsynchronised
clocks on the various hosts. Using some sort of refresh completion
indicator is a better solution. 

For instance, use a marker file that is deleted before the mirror
refresh starts and is replaced as the last action in the refresh
sequence. sa-update would first check whether the marker is present. If
it is not, then it knows that a refresh is in progress, and should wait
for a few seconds and look again. When the marker is present it can do
the download. If the gpg key is in a separate file, then this could
also serve as the marker file.

Another possibility would be to do the refresh by using the new ruleset
 under a temporary name and renaming it on completion so it replaces
the  previous version. This effectibely makes the download file into
its own completion marker.


Martin


Reply via email to