1 |
Hi, |
2 |
|
3 |
On Fri, 15 Jul 2016 18:03:30 +0000 Robin H. Johnson wrote: |
4 |
> Hi all, |
5 |
> |
6 |
> In tracing down problems with the git->rsync path, it has been noticed |
7 |
> that some developers have significant clock drift on their local systems |
8 |
> (up to one case of 14 days wrong), and it's potentially contributing to |
9 |
> problems in generating the rsync tree. |
10 |
> |
11 |
> I have implemented a check as part of the hook that validates Git push |
12 |
> certificates (require-signed-push). It looks for clock drift or an |
13 |
> overly long push, and aborts if needed. |
14 |
> |
15 |
> The tolerances are presently set to: |
16 |
> - 5 seconds of clock drift. |
17 |
|
18 |
Why such tight requirement? Why not a minute, which will not hurt |
19 |
git, but will help with system _temporarily_ out-of-sync. |
20 |
|
21 |
Some hardware clocks are real mess and can drift more that for 5 |
22 |
seconds in a few days (e.g. when system was shut down). And for NTP |
23 |
it will take time to correct system clock _properly_. While stuff |
24 |
like running ntpdate before ntp server if system is out of sync is |
25 |
possible, but it is not recommended nor possible on some workloads. |
26 |
So IRL NTP may take several hours to sync system properly. |
27 |
|
28 |
Set it for a minute or two. This will protect from commits from |
29 |
really out-of-sync systems (like 14 days mentioned above) and will |
30 |
keep usablity hight for others. |
31 |
|
32 |
> - 'git push' must be completed in 60 seconds. |
33 |
|
34 |
Why?! What is wrong if push will take 120 seconds? I often commit |
35 |
from quite an old box and git push takes 20-40 seconds, while this |
36 |
is within your limits, the margin is not safe. |
37 |
|
38 |
What if someone needs to commit via 2G GPRS or similar slow network |
39 |
link? Afaik we have developers on quite slow and unstable links. |
40 |
|
41 |
Just set this limit to 5 minutes to make it a sane protection of a |
42 |
stale push. |
43 |
|
44 |
Best regards, |
45 |
Andrew Savchenko |