Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 811966 - net-misc/ntp : ntp-client should sync periodically
Summary: net-misc/ntp : ntp-client should sync periodically
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-07 11:29 UTC by martin-kokos
Modified: 2021-09-07 16:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martin-kokos 2021-09-07 11:29:27 UTC
The ntp-client service should mount a cron that runs NTPCLIENT_CMD periodically, either by default (given net, dns, etc. is started), or by enabling an option in /etc/conf.d/ntp-client . (The service already does depend on cron, but I am missing why)

Rationale:
As the NTP wiki states: net-misc/ntp is a suite of tools utilizing Network Time Protocol. Their purpose is to keep the system clock in time.

There are two main components to the package:
ntp-client - to synchronize the system clock by querying the NTP network
ntpd - to be part of the NTP network and provide the service to others (clients)

The ntp-client service at the moment sets the clock *only when the service is started* via the NTPCLIENT_CMD as specified in /etc/conf.d/ntp-client . I believe this was sufficient when personal computers were booted often and only servers ran with long uptimes utilizing ntpd to keep them in sync. Today personal computers (laptops, desktop) also run for a long time (especially when using various suspend/sleep modes) and it is reasonable to assume they will not go out of sync.
I do not think it should be required to go through an elaborate process of setting up ntpd to keep personal computer in sync.

I would like to open discussion about this or just to find out I am missing some point.
Comment 1 Ben Kohler gentoo-dev 2021-09-07 11:35:52 UTC
If you want your clock to stay set indefinitely, you should use ntpd service.  It's for both client & server usage.
Comment 2 martin-kokos 2021-09-07 14:28:26 UTC
> If you want your clock to stay set indefinitely, you should use ntpd service.

In which case there is no point to ntp-client. I assumed it is there for the convenient and safe usecase of to just query and set.

If one wants to be able to use the NTP in a passive way (just query and set), they should not need to go through the elaborate setup of ntpd and make all the considerations regarding how NTP works and its security (as shown in https://wiki.gentoo.org/wiki/Ntp#Ntpd )
Comment 3 Mike Gilbert gentoo-dev 2021-09-07 15:58:13 UTC
ntp-client is meant for syncing the clock once at boot time.

Use ntpd (or another NTP package) if you want to keep the clock synched as the system is running.

The default ntpd configuration does not allow remote access and should just work out of the box, so I don't really understand your concerns about "elaborate setup" or "security".
Comment 4 martin-kokos 2021-09-07 16:13:40 UTC
In that case, I misunderstood the functions of the two. I would like to add an explicitly mention that running both ntp-client and ntpd is the recommended way to keep synchronised and that the defaults are safe and do not provide any external services by default.
Comment 5 Mike Gilbert gentoo-dev 2021-09-07 16:24:14 UTC
You really don't need to run both. Running just ntpd is sufficient.