On Sun, Jun 19, 2016 at 08:42:31AM -0700, Patrick Goebel wrote:
> I tried using the latest version from source and it does indeed start
> without going offline when the laptop is not on.  Even better, it starts
> syncing with the laptop when the laptop is turned on. However, for some odd
> reason the desktop does not sync with the other servers in the chrony.conf
> file when the laptop is off. Instead, 'chronyc tracking' always produces
> output similar to:
> 
> Reference ID    : 127.127.1.1 ()

That means no source is reachable and the local reference is enabled.
What does chronyc activity print? If the sources are offline, there
may be a problem with the system networking hooks, i.e. something is
not calling "chronyc online".

If you remove the offline option from chrony.conf, does it work?

I think with current chrony versions managing the online/offline state
is mainly useful in the following cases:

  1. there is a requirement to update the clock quickly after the
     network is up
  2. the network is up only for very short periods of time, which
     would be missed most of the time if chronyd was always online and
     used normal polling interval (e.g. 1024 seconds)
  3. chronyd is not allowed to send packets to prevent unnecessary
     dial-on-demand connections

I'm not sure how common are these nowadays. I suspect very few people
have dial-on-demand connections on their computers. The cases 1. and
2. can actually be handled without changing the online/offline state.
If the sources were always in the online state, the "up" networking
script could just call "chronyc burst 1/1" instead of "chronyc
online". Fast initial clock update after chronyd start can be enabled
with the iburst option. 

The networking scripts I've seen or written (e.g. for Fedora) for
managing the chrony online/offline state just check if there is a
default route. That works in most cases, but if the computer has
multiple interfaces and chronyd is polling a server in a local network
without default route, the networking scripts will switch all sources
to offline even if the server is still reachable. The scripts could be
improved to check and switch individual sources, but I guess it might
be easier to just leave them always online and call "chronyc burst"
when a network is brought up in order to get a clock update quickly.

> The relevant part of the chrony.conf file is still:
> 
> server 0.debian.pool.ntp.org offline minpoll 8
> server 1.debian.pool.ntp.org offline minpoll 8
> server 2.debian.pool.ntp.org offline minpoll 8
> server 3.debian.pool.ntp.org offline minpoll 8
> 
> server pi-robot-netbook.local prefer iburst minpoll 5

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.

Reply via email to