Bug 1012124 - chrony missing network prerequisite in systemd service file
Summary: chrony missing network prerequisite in systemd service file
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: chrony
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-25 18:47 UTC by Joseph D. Wagner
Modified: 2013-10-03 15:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-03 15:25:41 UTC
Type: Bug
Embargoed:


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

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.


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