From 5e5abb4d7ea48a9238b9baa22941fda6a6bbda8c Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Wed, 2 Jul 2014 16:03:27 -0700 Subject: [PATCH] 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. --- .../third_party/coreos-overlay/net-misc/ntp/files/ntpd.service | 1 + .../ntp/{ntp-4.2.6_p5-r10.ebuild => ntp-4.2.6_p5-r11.ebuild} | 0 2 files changed, 1 insertion(+) rename sdk_container/src/third_party/coreos-overlay/net-misc/ntp/{ntp-4.2.6_p5-r10.ebuild => ntp-4.2.6_p5-r11.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpd.service b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpd.service index 2317d94d30..8dc3e0b989 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpd.service +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/files/ntpd.service @@ -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 diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild b/sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.6_p5-r11.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild rename to sdk_container/src/third_party/coreos-overlay/net-misc/ntp/ntp-4.2.6_p5-r11.ebuild