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:
Michael Marineau 2014-07-02 16:03:27 -07:00
parent 242c7f9d63
commit 5e5abb4d7e
2 changed files with 1 additions and 0 deletions

View File

@ -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