Bug 1118157

Summary: chronyd.service strange dependencies
Product: [Fedora] Fedora Reporter: Aleksandar Kostadinov <akostadi>
Component: chronyAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: aromito, mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-12 14:33:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksandar Kostadinov 2014-07-10 06:10:21 UTC
chronyd.service lists:
After=ntpdate.service sntp.service ntpd.service
Conflicts=ntpd.service

why ntpd.service is in both After and Conflicts? Shouldn't chronny be specified to start after network is up through network.service of NetworkManager.service?

Comment 1 Miroslav Lichvar 2014-07-10 09:45:06 UTC
After=ntpd.service is needed to not start chronyd before ntpd exited. Without it "systemdctl start chronyd" when ntpd was running sometimes failed as chronyd tried to bind to port 123 before ntpd released it.

According to the following document, network.service is not really useful here.

http://www.freedesktop.org/software/systemd/man/systemd.special.html

Does it cause any problems for you?

Comment 2 Aleksandar Kostadinov 2014-07-10 12:50:53 UTC
Interesting read, thanks. I don't see any problems. But reading http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ it seems to me chronyd is good to have After=network.target

I read it like that.

Comment 3 Miroslav Lichvar 2014-07-10 13:03:41 UTC
I'm not sure. To me it looks like adding After=network.target won't make a difference as chronyd is using UDP only and can be stopped after network, it shouldn't really matter.

Comment 4 Aleksandar Kostadinov 2014-07-10 13:31:49 UTC
If there are no TCP connections used, then you are right.

Comment 5 Miroslav Lichvar 2014-09-12 14:33:58 UTC
Ok, I'm closing this bug. If there are any cases where the dependency on the network target would be useful, please reopen.