Bug 1012124 - chrony missing network prerequisite in systemd service file
chrony missing network prerequisite in systemd service file
Product: Fedora
Classification: Fedora
Component: chrony (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-09-25 14:47 EDT by Joseph D. Wagner
Modified: 2013-10-03 11:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-03 11:25:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
josephwagner-boot.xml (150.40 KB, text/xml)
2013-09-29 23:29 EDT, Joseph D. Wagner
no flags Details
josephwagner-journalctl-boutput.txt (207.65 KB, text/plain)
2013-09-29 23:30 EDT, Joseph D. Wagner
no flags Details

  None (edit)
Description Joseph D. Wagner 2013-09-25 14:47:17 EDT
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):

How reproducible:

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:
Comment 1 Miroslav Lichvar 2013-09-26 03:32:37 EDT
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-29 23:29:26 EDT
Created attachment 804859 [details]
Comment 3 Joseph D. Wagner 2013-09-29 23:30:41 EDT
Created attachment 804860 [details]
Comment 4 Joseph D. Wagner 2013-09-29 23:32:00 EDT
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 05:51:33 EDT
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 11:25:41 EDT
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.

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