Bug 1187072 - PRESET: enable timedatex service by default
Summary: PRESET: enable timedatex service by default
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-29 10:00 UTC by Miroslav Lichvar
Modified: 2015-02-06 13:27 UTC (History)
8 users (show)

Fixed In Version: systemd-218-5.fc22
Clone Of:
Environment:
Last Closed: 2015-02-06 12:29:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Lichvar 2015-01-29 10:00:57 UTC
Description of problem:
timedatex is now installed as a dependency of the chrony and ntp packages replacing systemd-timedated as the timedated implementation. Please add timedatex.service to the default preset file so it's enabled on installation.

https://fedorahosted.org/fesco/ticket/1394

Comment 1 Lennart Poettering 2015-02-04 21:27:47 UTC
This is complete and utter non-sense...

I mean, if you install NTP server software, why the hell should a UI like GNOME cover that? Will you create a UI for enabling Apache next?

The boolean is for enabling a simple NTP client, that's all. 

Honestly, if you think that GNOME should control server software, then talk to them, but don't fuck up our APIs with overriding it. In the newer systemd versions the unit enablement and disablement APIs support polkit, so there's no need at all to fiddle with the NTP prop anymore.  Just make GNOME control your NTP server of choice directly...

Comment 2 Zbigniew Jędrzejewski-Szmek 2015-02-04 22:14:30 UTC
Well, timesyncd is not really ready as an NTP client for F22. So they want to be able to enable whatever ntp client is installed.

Comment 3 Miroslav Lichvar 2015-02-05 08:43:35 UTC
Yes, we want to be able to select the default NTP client at the distribution/product level and not break GNOME control and other applications using the timedated API.

This is not about NTP servers, I'm not sure why Lennart keeps bringing that up.

If someone thinks timesyncd should be the default client, submit a change proposal and we can discuss the advantages and disadvantages it would have against the current default.

Comment 4 Jóhann B. Guðmundsson 2015-02-05 09:17:38 UTC
(In reply to Miroslav Lichvar from comment #3)
> 
> If someone thinks timesyncd should be the default client, submit a change
> proposal and we can discuss the advantages and disadvantages it would have
> against the current default.

There is no such thing as system wide default anymore after the move to "products" and people need to start realizing that fact.

For example baseWG and workstation WG might want to use timesyncd as their client while cloudWG and serverWG might want to use NTP. 

As such arguably each "WG" now needs to carry it's own preset file for their stuff.

Comment 5 Miroslav Lichvar 2015-02-05 10:51:07 UTC
Sure, different products can have different NTP clients installed by default and with timedatex we can now do that without breaking applications using the timedated API.

Comment 6 Jóhann B. Guðmundsson 2015-02-05 11:11:35 UTC
(In reply to Miroslav Lichvar from comment #5)
> Sure, different products can have different NTP clients installed by default
> and with timedatex we can now do that without breaking applications using
> the timedated API.

The only way how ( due to units having to be conflicting with each other ) is for those that dont want timedated+timesyncd build systemd without timedated and provide an alternative implementation of its D-Bus interface from F22 and onwards so obviously the WG that chooses to do that will need to maintain it's own version of systemd without that compiled in so the proper course of action here is... 

For chrony to drop  /usr/lib/systemd/ntp-units.d/50-chronyd.list

And add

Conflicts=systemd-timesyncd + all others ( including timedatex )

For NTP to drop /usr/lib/systemd/ntp-units.d/60-ntpd.list

Conflicts=systemd-timesyncd + all others ( including timedatex )

For $EVERYTHING_BEING_SHIPPED to drop

/usr/lib/systemd/ntp-units.d/$FOO-LIST

Conflicts=systemd-timesyncd + all others ( including timedatex )

gnome-control-center/xfce4-settings etc. drop the support for /usr/lib/systemd/ntp-units.d from their code.

Comment 7 Miroslav Lichvar 2015-02-05 11:29:54 UTC
(In reply to Jóhann B. Guðmundsson from comment #6)
> The only way how ( due to units having to be conflicting with each other )
> is for those that dont want timedated+timesyncd build systemd without
> timedated and provide an alternative implementation of its D-Bus interface
> from F22 and onwards so obviously the WG that chooses to do that will need
> to maintain it's own version of systemd without that compiled in so the
> proper course of action here is... 

I don't follow. If timedatex is installed (as a dependency of chrony/ntp packages) and the timedatex service is enabled (from preset as requested in this bug), the timedated applications talk to timedatex. If not installed or not enabled, they talk to systemd-timedated as expected.

To avoid wasting disk space it would of course be better if timesyncd, timedated and other stuf had their own systemd subpackages, but it's not necessary.

Comment 8 Jóhann B. Guðmundsson 2015-02-05 12:11:27 UTC
(In reply to Miroslav Lichvar from comment #7)
> (In reply to Jóhann B. Guðmundsson from comment #6)
> > The only way how ( due to units having to be conflicting with each other )
> > is for those that dont want timedated+timesyncd build systemd without
> > timedated and provide an alternative implementation of its D-Bus interface
> > from F22 and onwards so obviously the WG that chooses to do that will need
> > to maintain it's own version of systemd without that compiled in so the
> > proper course of action here is... 
> 
> I don't follow. If timedatex is installed (as a dependency of chrony/ntp
> packages) and the timedatex service is enabled (from preset as requested in
> this bug), the timedated applications talk to timedatex. If not installed or
> not enabled, they talk to systemd-timedated as expected.

timedated only manages timesyncd if you want to use something else then build systemd without timedated and provide an alternative implementation of its D-Bus interface and carry a patch or convince upstream to use that.

Dont re-use or introduce anything under the systemd namespace ( particularly in this case /etc/systemd/ntp-units.d, /usr/lib/systemd/ntp-units.d ). 

I'm pretty sure no one here ( and upstream ) wants to start dealing with any fallout bugs from "copy" implementations of components since it *will* double the work on everybody ( is it timesyncd or timedatex etc )

Arguably systemd should hard crash if it detects some hacks like that.

Comment 9 Miroslav Lichvar 2015-02-05 12:26:28 UTC
(In reply to Jóhann B. Guðmundsson from comment #8)
> Dont re-use or introduce anything under the systemd namespace ( particularly
> in this case /etc/systemd/ntp-units.d, /usr/lib/systemd/ntp-units.d ). 

The systemd package no longer owns that directory, but I can see your point. I think it wouldn't be a big problem to move the directory somewhere else.

> I'm pretty sure no one here ( and upstream ) wants to start dealing with any
> fallout bugs from "copy" implementations of components since it *will*
> double the work on everybody ( is it timesyncd or timedatex etc )

Agreed. If only systemd upstream considered that before they dropped the NTP selection code.

Comment 10 Jóhann B. Guðmundsson 2015-02-05 13:48:21 UTC
(In reply to Miroslav Lichvar from comment #9)
> (In reply to Jóhann B. Guðmundsson from comment #8)
> > Dont re-use or introduce anything under the systemd namespace ( particularly
> > in this case /etc/systemd/ntp-units.d, /usr/lib/systemd/ntp-units.d ). 
> 
> The systemd package no longer owns that directory, but I can see your point.
> I think it wouldn't be a big problem to move the directory somewhere else.

Upstreams would have re-factor their code to support fork of timedated and it's dbus implementation ( which should be implemented under another name space as in org.freedesktop.timedatex in your case )

> > I'm pretty sure no one here ( and upstream ) wants to start dealing with any
> > fallout bugs from "copy" implementations of components since it *will*
> > double the work on everybody ( is it timesyncd or timedatex etc )
> 
> Agreed. If only systemd upstream considered that before they dropped the NTP
> selection code.

It serves no purpose to support other solution et all if systemd is being used ( and since what Gnome 3.4, it depends on systemd dbus api's not forks of them along with XFCE and soon KDE etc ) so wide variety of usptreams support just that or the option to build without systemd encase you want to use something else.
 
Just out of curiosity what was the workstation's WG along with the KDE/XFCE/LXDE community's take on this since I believe the upstream Gnome camp recommendation was to remove chrony/ntp upon upgrades and dont deploy them on fresh Gnome installs ( although they ensured nothing would be broken upon this transition ).

Comment 11 Jóhann B. Guðmundsson 2015-02-05 13:49:13 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #2)
> Well, timesyncd is not really ready as an NTP client for F22. So they want
> to be able to enable whatever ntp client is installed.

What's missing from timesyncd being ready as an ntp client for F22 and onwards?

Comment 12 Zbigniew Jędrzejewski-Szmek 2015-02-05 18:38:58 UTC
(In reply to Jóhann B. Guðmundsson from comment #11)
> (In reply to Zbigniew Jędrzejewski-Szmek from comment #2)
> > Well, timesyncd is not really ready as an NTP client for F22. So they want
> > to be able to enable whatever ntp client is installed.
> 
> What's missing from timesyncd being ready as an ntp client for F22 and
> onwards?

It doesn't cover all the cases yet:
- It tends to inexplicably crash on arm every once in a while.
- It does not implement exponential fallback of queries in all cases.
- I'm not sure how it functions when systmed-networkd is not running.
And most important, it hasn't been widely tested yet. 

(In reply to Miroslav Lichvar from comment #3)
> If someone thinks timesyncd should be the default client, submit a change
> proposal and we can discuss the advantages and disadvantages it would have
> against the current default.
Yes, I think this is the right thing to do for the distribution as a whole.
systemd-timesyncd is not far from being ready, so it is possible that the
proposal would go through, but I think we should go through this public discussion
before we enable it widely. So far nobody has stepped up to do that.

Comment 13 Jóhann B. Guðmundsson 2015-02-05 18:54:13 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #12)
> (In reply to Jóhann B. Guðmundsson from comment #11)
> > (In reply to Zbigniew Jędrzejewski-Szmek from comment #2)
> > > Well, timesyncd is not really ready as an NTP client for F22. So they want
> > > to be able to enable whatever ntp client is installed.
> > 
> > What's missing from timesyncd being ready as an ntp client for F22 and
> > onwards?
> 
> It doesn't cover all the cases yet:
> - It tends to inexplicably crash on arm every once in a while.
> - It does not implement exponential fallback of queries in all cases.
> - I'm not sure how it functions when systmed-networkd is not running.
> And most important, it hasn't been widely tested yet. 

Regardless of that it does cover upstream that rely on it and it's no assurance that timedate implementations in wide variety of upstreams support /usr/lib/systemd/ntp-units.d/foo.list(s) ( and if they do no assurance for how long ) so how do you propose that being solved since his solution does not do that. ( it's just implemented on the hope it does )

Comment 14 Zbigniew Jędrzejewski-Szmek 2015-02-05 19:35:57 UTC
The proposed solution currently works with ntp and chrony. That should be sufficient for now.

Comment 15 Jóhann B. Guðmundsson 2015-02-05 20:42:38 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #14)
> The proposed solution currently works with ntp and chrony. That should be
> sufficient for now.

I somehow doubt that you have looked upstream *DE's where they are using timedate dbus API to see if the proposed solution still works there, in all of them and with multiple time clients/servers. 

And the current implementation of ntp and chrony running and being managed via systemctl works just fine so if the intent is to have timedated the place to control multiple NTP client/servers, in desktop here downstream it's better to drop timedatex and revert the relevant commit instead of having half assed fork floating around in the distribution doing the same and potentially break applications in DE's in the process. ( I'm pretty sure this fork has received less testing time in all the DE's than timedate+timesyncd itself )

But hey that's just me so you if are confident that timedatex is the correct way forward and the best mean to handle this by all means and let's see how well that pans out in the long run...

Comment 16 Zbigniew Jędrzejewski-Szmek 2015-02-05 20:47:44 UTC
(In reply to Jóhann B. Guðmundsson from comment #15)
> And the current implementation of ntp and chrony running and being managed
> via systemctl works just fine so if the intent is to have timedated the
> place to control multiple NTP client/servers, in desktop here downstream
> it's better to drop timedatex and revert the relevant commit
That's what I did in F21.
Upstream, and in F22, the revert was not added.

I think the revert is good (I did it myself after all), but it is a divergence from upstream. As you can see from comment #c1 there's strong upstream opposition.

Comment 17 Miroslav Lichvar 2015-02-06 08:09:01 UTC
(In reply to Jóhann B. Guðmundsson from comment #11)
> What's missing from timesyncd being ready as an ntp client for F22 and
> onwards?

Some of the problems I'm aware of:
- not a full NTP client (reliability)
- poor clock control (jittery/congested/intermittent networks, virtual machines)
- no integration with NetworkManager (missing servers from DHCP)

To be considered as a replacement for chrony, I think it would need to be comparable in the basic features and do something better, otherwise I don't see the benefit for the distribution or products. Also, I think the upstream should be able to catch serious bugs like frequent polling before making new release.

Anyway, this bug can be closed as systemd-218-5 was built in rawhide. Thanks!


Note You need to log in before you can comment on or make changes to this bug.