Gentoo Archives: gentoo-dev

From: Rafael Goncalves Martins <rafaelmartins@g.o>
To: Gentoo Development <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Signed push & clock drift rejection
Date: Mon, 18 Jul 2016 01:12:49
Message-Id: CAHgY3qe-ztXuLJ9h3nyzLY2uH1Mf7zCzgZQj3_uRvEcni5i4WQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] Signed push & clock drift rejection by Andrew Savchenko
1 On Sat, Jul 16, 2016 at 11:33 AM, Andrew Savchenko <bircoph@g.o> wrote:
2 > Hi,
3 >
4 > On Fri, 15 Jul 2016 18:03:30 +0000 Robin H. Johnson wrote:
5 >> Hi all,
6 >>
7 >> In tracing down problems with the git->rsync path, it has been noticed
8 >> that some developers have significant clock drift on their local systems
9 >> (up to one case of 14 days wrong), and it's potentially contributing to
10 >> problems in generating the rsync tree.
11 >>
12 >> I have implemented a check as part of the hook that validates Git push
13 >> certificates (require-signed-push). It looks for clock drift or an
14 >> overly long push, and aborts if needed.
15 >>
16 >> The tolerances are presently set to:
17 >> - 5 seconds of clock drift.
18 >
19 > Why such tight requirement? Why not a minute, which will not hurt
20 > git, but will help with system _temporarily_ out-of-sync.
21 >
22 > Some hardware clocks are real mess and can drift more that for 5
23 > seconds in a few days (e.g. when system was shut down). And for NTP
24 > it will take time to correct system clock _properly_. While stuff
25 > like running ntpdate before ntp server if system is out of sync is
26 > possible, but it is not recommended nor possible on some workloads.
27 > So IRL NTP may take several hours to sync system properly.
28 >
29 > Set it for a minute or two. This will protect from commits from
30 > really out-of-sync systems (like 14 days mentioned above) and will
31 > keep usablity hight for others.
32
33 I second this "request" :)
34
35 remote: Your system clock is off by 6 seconds (limit 5)
36
37 Regards,
38 Rafael
39
40 >> - 'git push' must be completed in 60 seconds.
41 >
42 > Why?! What is wrong if push will take 120 seconds? I often commit
43 > from quite an old box and git push takes 20-40 seconds, while this
44 > is within your limits, the margin is not safe.
45 >
46 > What if someone needs to commit via 2G GPRS or similar slow network
47 > link? Afaik we have developers on quite slow and unstable links.
48 >
49 > Just set this limit to 5 minutes to make it a sane protection of a
50 > stale push.
51 >
52 > Best regards,
53 > Andrew Savchenko
54
55
56
57 --
58 Rafael Goncalves Martins
59 Gentoo Linux developer
60 http://rafaelmartins.eng.br/

Replies

Subject Author
Re: [gentoo-dev] Signed push & clock drift rejection Marc Schiffbauer <mschiff@g.o>
Re: [gentoo-dev] Signed push & clock drift rejection Ulrich Mueller <ulm@g.o>