Skip to contentSkip to conversation

ntp: disable automatic panic shutdown for ntpd

meta-networking Applied Andreas Müller 2 participants 2 messages Sep 16, 2013

lore
Share & tools
lore
#0 lore raw

Taken from [1]:

"However, if the difference between the client time and server time is greater than the panic threshold, which defaults to 1000 s, the daemon will send a message to the system log and shut down without setting the clock."

On RTC-less or 'fresh' systems with unpredicatble inital date ntpd will stop with work undone (note: I did NOT find the message mentioned above - so it took long way to fix). This is a wide use case for using NTP in production:
No need for initial datetime setup by some operator.

[1] http://doc.ntp.org/4.1.1/debug.htm

---
 .../recipes-support/ntp/ntp/ntpd.service           |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta-networking/recipes-support/ntp/ntp/ntpd.service +1 -1
index bd87b1e..eb9c030 100644
@@ -5,7 +5,7 @@ After=network.target
 [Service]
 Type=forking
 PIDFile=/run/ntpd.pid
-ExecStart=/usr/bin/ntpd -p /run/ntpd.pid
+ExecStart=/usr/bin/ntpd -p /run/ntpd.pid -g
 
 [Install]
 WantedBy=multi-user.target
Signature · 1 line
1.7.6.5
#1 lore raw
Quoted 23 lines · [[oe] [meta-networking] ntp: disable automatic panic shutdown for ntpd] On…

Taken from [1]:

"However, if the difference between the client time and server time is greater than the panic threshold, which defaults to 1000 s, the daemon will send a message to the system log and shut down without setting the clock."

On RTC-less or 'fresh' systems with unpredicatble inital date ntpd will stop with work undone (note: I did NOT find the message mentioned above - so it took long way to fix). This is a wide use case for using NTP in production:
No need for initial datetime setup by some operator.

[1] http://doc.ntp.org/4.1.1/debug.htm

---
 .../recipes-support/ntp/ntp/ntpd.service           |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta-networking/recipes-support/ntp/ntp/ntpd.service +0 -0
index bd87b1e..eb9c030 100644

meta-networking/recipes-support/ntp/ntp/ntpd.service After=network.target · line 11

Quoted 8 lines
meta-networking/recipes-support/ntp/ntp/ntpd.service +1 -1
@@ -5,7 +5,7 @@ After=network.target
 [Service]
 Type=forking
 PIDFile=/run/ntpd.pid
-ExecStart=/usr/bin/ntpd -p /run/ntpd.pid
+ExecStart=/usr/bin/ntpd -p /run/ntpd.pid -g
 
 [Install]
 WantedBy=multi-user.target

Merged, thanks.

Signature · 2 lines
-Joe MacDonald.
:wq