mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-19 13:31:28 +02:00
ntpd: always restart, required to handle large time jumps.
Some VM platforms suspend machines by simply stopping them instead of gracefully suspending them like real hardware would. This means that when the system is resumed the kernel's time will be completely wrong and it doesn't have a way to fix it. Additionally ntp will abort if the clock offset is greater than 1000 seconds (conveniently without logging any error messages). We can tune that in ntp.conf but ntpd has so many knobs related to how it skews the clock and other update strategies that the easiest option is to just restart.
This commit is contained in:
parent
242c7f9d63
commit
5e5abb4d7e
@ -5,6 +5,7 @@ After=ntpdate.service sntp.service
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/ntpd -g -n -u ntp:ntp -f /var/lib/ntp/ntp.drift
|
||||
PrivateTmp=true
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
x
Reference in New Issue
Block a user