Bug 445174 - Support using chrony instead of ntp/ntpsec
Summary: Support using chrony instead of ntp/ntpsec
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_clock (show other bugs)
Version: 5.23.2
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Paul Campbell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-08 18:48 UTC by Neal Gompa
Modified: 2021-11-08 23:18 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neal Gompa 2021-11-08 18:48:33 UTC
SUMMARY
In RHEL/Fedora, we use chrony by default instead of ntp/ntpsec. Can we please have the KCM work with Chrony instead, as we don't want to ship ntpd.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 35 (KDE Plasma)
(available in About System)
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87
Qt Version: 5.15.2

ADDITIONAL INFORMATION
This was originally brought up downstream in: https://pagure.io/fedora-kde/SIG/issue/129
Comment 1 Nate Graham 2021-11-08 18:52:50 UTC
Makes sense.
Comment 2 Nicolas Fella 2021-11-08 19:33:20 UTC
The KCM calls org.freedesktop.timedate1.SetNTP  which as I understand is implemented by systemd-timesyncd. Are you saying this doesn't work/can't be used on Fedora?
Comment 3 Neal Gompa 2021-11-08 19:38:38 UTC
We don't have timesyncd enabled by default, no.
Comment 4 Nicolas Fella 2021-11-08 19:47:00 UTC
> We don't have timesyncd enabled by default, no.

Is there a deeper reason for that?

Just for my understanding, chrony would be an alternative to timesyncd here?
Comment 5 Neal Gompa 2021-11-08 19:50:31 UTC
(In reply to Nicolas Fella from comment #4)
> > We don't have timesyncd enabled by default, no.
> 
> Is there a deeper reason for that?
> 
> Just for my understanding, chrony would be an alternative to timesyncd here?

We've been using chrony for years, and my understanding is that chrony is considered a better time server+client implementation than timesyncd.
Comment 6 Nicolas Fella 2021-11-08 20:38:51 UTC
Can you please describe what user-facing problem there currently is? I'm not sure I understand what we are fixing here. On my OpenSUSE Tumbleweed enabling automatic time settings seems to work despite the system apparently using chrony
Comment 7 Nate Graham 2021-11-08 22:07:33 UTC
I guess it's that you can't disable the feature since it only hooks into ntpd. So it's possible to uncheck the checkbox, but the time keeps getting set automatically, because the thing that does it (chrony) doesn't listen to that setting. The path of least resistance would be to just hide the checkbox when ntpd isn't available, though it might be nice to make the checkbox work on chrony too.
Comment 8 Nicolas Fella 2021-11-08 22:16:47 UTC
There seems to be some confusion here. The KCM uses org.freedesktop.timedate1/systemd-timesyncd if the DBus interface is available, which it is on Fedora(!). ntpd, which is a third option/alternative to chrony/systemd-timesyncd isn't really relevant here
Comment 9 Neal Gompa 2021-11-08 22:18:20 UTC
(In reply to Nicolas Fella from comment #8)
> There seems to be some confusion here. The KCM uses
> org.freedesktop.timedate1/systemd-timesyncd if the DBus interface is
> available, which it is on Fedora(!). ntpd, which is a third
> option/alternative to chrony/systemd-timesyncd isn't really relevant here

It shouldn't be, we don't even have timesyncd enabled and running by default.

https://src.fedoraproject.org/rpms/fedora-release/blob/rawhide/f/90-default.preset#_4-5
Comment 10 Nicolas Fella 2021-11-08 22:21:03 UTC
Running 'qdbus --system org.freedesktop.timedate1' on Fedora 34 (Gnome) shows that is *is* available/getting activated
Comment 11 Neal Gompa 2021-11-08 22:59:22 UTC
`timedate1` isn't the same thing as timesyncd. I believe `timedated` is a separate dbus-activated service.
Comment 12 Nicolas Fella 2021-11-08 23:10:41 UTC
aaah, yes, timedated and timesyncd are indeed separate things. That explains a lot of my confusion.

The KCM is calling time*date*d to enable NTP, which then seems to activate the appropriate thing (chrony or systemd-timesyncd).

On my OpenSUSE system 'systemctl status systemd-timedated' contains
Nov 26 18:23:32 dumbledore systemd-timedated[6796]: chronyd.service: Enabling unit.
Nov 26 18:23:32 dumbledore systemd-timedated[6796]: Set NTP to enabled (chronyd.service).

On my Manjaro system (which seems to use systemd-timesyncd) it contains
Nov 08 22:26:00 madeye systemd-timedated[4532]: Set NTP to enabled (systemd-timesyncd.service).

So as far as I can tell things "just work", which brings me back to my question of what user-facing symptoms we are having in Fedora
Comment 13 Neal Gompa 2021-11-08 23:11:33 UTC
Honestly, I'm not sure, Nate reported the problem to me in the Fedora KDE tracker, and I forwarded it back up here.
Comment 14 Nate Graham 2021-11-08 23:12:18 UTC
If everything is fine, feel free to close both :)