Modify

Opened 5 years ago

#12562 new defect

chrony init blocks boot process

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: chrony ntp gps gpsd time boot Cc:

Description

The package "chrony" includes an init.d script which can block the boot process.
It will block the boot process if the router has no internet connection (or no gateway is defined) and therefore it can not grab NTP data.

Line 31 of /etc/init.d/ntpd

while chronyc tracking | grep 'Reference ID.*0.0.0.0' >/dev/null ; do sleep 1; done

This while-loop will run infinitely, until a Reference ID for all the pre-defined NTP servers is found.

Why this loop is bad:

  • If only one NTP server is down the loop will not abort, even though we could get valid time
  • If we dont have internet connection the router wont properly start (all services after chrony wont start)
  • If we have a fresh OpenWRT install then the overlay-partition will not properly set up (because "firstboot" usually runs after chrony in the rc.d boot order)

Especially the last point caused me a lot confusion. Ticket #12074 is the result of chronys infinte-looping init script which prevented the router from running a proper "firstboot". Damn, that was a pain in the ass.

(This was already mentioned in #10264, but the patch only fixes the problem for gpsd timesources, not for normal NTP servers.)

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.