Patchwork [meta-networking] ntp: disable automatic panic shutdown for ntpd

login
register
mail settings
Submitter Andreas Müller
Date Sept. 16, 2013, 7:06 a.m.
Message ID <1379315195-18861-1-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/58087/
State Accepted
Commit 080887cf4a95455d11e7a3e176c7c35740e72ea6
Headers show

Comments

Andreas Müller - Sept. 16, 2013, 7:06 a.m.
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

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../recipes-support/ntp/ntp/ntpd.service           |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Joe MacDonald - Sept. 16, 2013, 6:44 p.m.
[[oe] [meta-networking] ntp: disable automatic panic shutdown for ntpd] On 13.09.16 (Mon 09:06) Andreas Müller wrote:

> 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
> 
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
>  .../recipes-support/ntp/ntp/ntpd.service           |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/meta-networking/recipes-support/ntp/ntp/ntpd.service b/meta-networking/recipes-support/ntp/ntp/ntpd.service
> index bd87b1e..eb9c030 100644
> --- a/meta-networking/recipes-support/ntp/ntp/ntpd.service
> +++ b/meta-networking/recipes-support/ntp/ntp/ntpd.service
> @@ -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.

Patch

diff --git a/meta-networking/recipes-support/ntp/ntp/ntpd.service b/meta-networking/recipes-support/ntp/ntp/ntpd.service
index bd87b1e..eb9c030 100644
--- a/meta-networking/recipes-support/ntp/ntp/ntpd.service
+++ b/meta-networking/recipes-support/ntp/ntp/ntpd.service
@@ -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