Bug 1012124

Summary: chrony missing network prerequisite in systemd service file
Product: [Fedora] Fedora Reporter: Joseph D. Wagner <joe>
Component: chronyAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: joe, 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: 2013-10-03 15:25:41 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:
Attachments:
Description Flags
josephwagner-boot.xml
none
josephwagner-journalctl-boutput.txt none

Description Joseph D. Wagner 2013-09-25 18:47:17 UTC
Description of problem: chronyd is a network time daemon, but systemd is starting it before networking is available. This adds 15 seconds to the amount of time chronyd takes to start, due to waiting for a network connection that isn't yet available.


Version-Release number of selected component (if applicable):
chrony-1.29-1.fc19.x86_64

How reproducible:
100%.

Steps to Reproduce:
1. run systemd-analyze plot > boot.xml
2. view boot.xml in a browser

Actual results:
chronyd is started, NetworkManager is started later.
chronyd finishes starting after NetworkManager finishes starting, some 15 seconds later.

Expected results:
NetworkManager is started and finished, then chronyd is started and finishes in about 1 second.


Additional info:
I'm not sure if this is *the* fix, but the fix should look something like this:
After=network.target
Requires=network.target

Comment 1 Miroslav Lichvar 2013-09-26 07:32:37 UTC
chronyd doesn't necessarily need network (it can use a reference clock) and it should be started as soon as possible to load the drift file and possibly correct the system clock by RTC. I'd like to avoid adding that dependency.

Normally, the reported time for starting the chronyd service is at most couple hundreds of milliseconds.
  
Can you please attach the logs and the bootchart? Do you have the chrony-wait service enabled? Are there NTP servers configured by DHCP?

There is also a bug in systemd-journald that blocks logging, which might be relevant here (see bug #983688).

Comment 2 Joseph D. Wagner 2013-09-30 03:29:26 UTC
Created attachment 804859 [details]
josephwagner-boot.xml

Comment 3 Joseph D. Wagner 2013-09-30 03:30:41 UTC
Created attachment 804860 [details]
josephwagner-journalctl-boutput.txt

Comment 4 Joseph D. Wagner 2013-09-30 03:32:00 UTC
I've attached the boot chart and the logs.  chrony-wait is disabled.

> Are there NTP servers configured by DHCP?

It's the default configuration.  If you need more info, you'll need to help me out on where to look.

Comment 5 Miroslav Lichvar 2013-10-03 09:51:33 UTC
The log and graph look good to me. chronyd was started before NetworkManager.

Can you please add an example where we can see the problem you are reporting?

Comment 6 Joseph D. Wagner 2013-10-03 15:25:41 UTC
Well that's weird.  (I submitted the graph without looking at it.  Sorry.)

It appears to be working now, and I don't know why.  I am closing it since I can no longer reproduce the problem.