Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NTP time sync in the future throws more into the future #8771

Closed
Tracked by #8484
smira opened this issue May 21, 2024 · 0 comments · Fixed by #8789
Closed
Tracked by #8484

NTP time sync in the future throws more into the future #8771

smira opened this issue May 21, 2024 · 0 comments · Fixed by #8789
Assignees

Comments

@smira
Copy link
Member

smira commented May 21, 2024

Bug Report

Time before: 2047, time after 2160 🤯

 [  96.020599] [talos] adjusting time (jump) by 988553h9m32.333595896s via A.B.C.D, state TIME_OK, status STA_NANO {"component": "controller-runtime", "controller": "time.SyncController"}^M

Description

Logs

Environment

  • Talos version: v1.6.7
smira added a commit to smira/ntp that referenced this issue May 22, 2024
The problem here is that `time.Duration` and `time.Time` types don't
exactly match the NTP 64-bit time value, so the expected calculations
for big time jumps (including across NTP eras) don't work properly.

See:

* https://www.eecis.udel.edu/~mills/y2k.html
* https://www.eecis.udel.edu/~mills/time.html

Ref: siderolabs/talos#8771

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
beevik pushed a commit to beevik/ntp that referenced this issue May 23, 2024
The problem here is that `time.Duration` and `time.Time` types don't
exactly match the NTP 64-bit time value, so the expected calculations
for big time jumps (including across NTP eras) don't work properly.

See:

* https://www.eecis.udel.edu/~mills/y2k.html
* https://www.eecis.udel.edu/~mills/time.html

Ref: siderolabs/talos#8771

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
@smira smira self-assigned this May 24, 2024
smira added a commit to smira/talos that referenced this issue May 24, 2024
Logs:

```
[    7.127481] [talos] adjusting time (jump) by -205704h26m36.111961385s via 162.159.200.1, state TIME_OK, status STA_NANO {"component": "controller-runtime", "controller":t}
```

Fix: beevik/ntp#47

Fixes: siderolabs#8771

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>#
smira added a commit to smira/talos that referenced this issue May 28, 2024
Logs:

```
[    7.127481] [talos] adjusting time (jump) by -205704h26m36.111961385s via 162.159.200.1, state TIME_OK, status STA_NANO {"component": "controller-runtime", "controller":t}
```

Fix: beevik/ntp#47

Fixes: siderolabs#8771

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 01ea820)
smira added a commit to smira/talos that referenced this issue May 29, 2024
Logs:

```
[    7.127481] [talos] adjusting time (jump) by -205704h26m36.111961385s via 162.159.200.1, state TIME_OK, status STA_NANO {"component": "controller-runtime", "controller":t}
```

Fix: beevik/ntp#47

Fixes: siderolabs#8771

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
(cherry picked from commit 01ea820)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant