Control: merge -1 883241 Control: reassign -1 systemd Control: tags -1 - moreinfo
Dear systemd maintainers,We have found out in #902026 that the use of “Conflicts=” does not prevent systemd-timesyncd and chrony to run at the same time, those two bug reports that I’m reassigning to systemd seem to also be related to the way the “Conflicts=” setting works.
What we currently have in Stretch and Buster is:- systemd-timesyncd runs by default unless another NTP daemon is installed on the system through the use of the “ConditionFileIsExecutable=” condition.
- all the other implementations of the NTP protocol conflict with systemd-timesyncd.
The current state of affairs seems to render both systemd-timesyncd and chrony becoming inactive on some systems. Concerning systemd-timesyncd, this is not surprising as “ConditionFileIsExecutable=!/usr/sbin/chronyd” is obviously not met. To make chrony active at startup on those systems, one has to either completely disable systemd-timesyncd or override chrony’s unit file to drop the “Conflicts=systemd-timesyncd.service” setting.
Thankfully there is some work done¹ upstream which may improve the situation.
¹ https://github.com/systemd/systemd/pull/13136 On Fri, Aug 02, 2019 at 09:59:59AM -0700, Ross Boylan wrote:
Removing systemd-timesyncd from chrony's Conflicts directive worked. Some comments and details below, with more in the attached log.
Thank you for testing Ross.
>I did systemctl disable systemd-timesyncd and now chrony runs (and >stays running) on startup. Disabling systemd-timesyncd was guaranteed enough to succeed. That shows that chrony is probably not at fault here. However, before merging this bug report with #883241 and reassigning them to systemd, I would really appreciate if you could check what’s happening by removing systemd-timesyncd.service from the “Conflicts=” line in the chrony unit file. Note that I would totally understand that you refuse to run some tests again! I certainly do not want to burden you. If you accept to run these tests, then: # Reenable systemd-timesyncd # systemctl enable systemd-timesyncd.service # Edit chrony’s unit file # systemctl edit --full chrony.service That will invoke an editor. From there, remove “systemd-timesyncd.service” from the “Conflicts=” line. Save & exit!I did this, also inserting the Wants=time-sync.target Before=time-sync.target directives into the new file. I left the override file that has those directives too; not sure if it gets checked if I've overridden the whole file.
It does. Look for the “Drop-In:” line when running: $ systemctl status chrony.serviceAlternatively, you can get a list of *.conf files in drop-in directories by running:
$ systemd-delta --type extended
# Restart the system and report chrony’s status here (ditto for systemd-timesyncd)See attached, which was done with systemd.log_type=debug. It also gives the contents of the configuration files. It worked properly: chrony was active on startup.
Thanks again!
Ross
Cheers, Vincent
signature.asc
Description: PGP signature