[chrony-users] Best/proper use of orphan mode

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Hello everybody,

I have three hosts on a LAN whose clocks should stay in sync (in sync to each other, ideally also in sync to correct time).
As a second requirement, the chrony configs for all three nodes have to be identical (symmetric).

According to the documentation and to the comments in the chrony source code, this should be the use case for the "local orphan" option.
However, the documentation does not contain how exactly the configuration should look like.

Q1: Should the hosts on the LAN be configured as "server"s or as "peer"s?

I tried the following configuration (only relevant settings - everything else is pretty much default):
----
# external NTP server - preferred time source
server ntp.example.com iburst prefer

# "fallback" servers: the three hosts on the LAN
server 10.21.2.181 iburst maxpoll 6
server 10.21.2.182 iburst maxpoll 6
server 10.21.2.183 iburst maxpoll 6

# make sure local servers can serve each other
allow 10.21.0.0/22

local stratum 10 orphan
---

The idea is that if the connectivity to the external server fails, the three hosts should become orphans and sync to the one with the lowest reference id (IP address). If that host also goes down, the second-lowest id should take over.

Q2: How can I detect if a host has switched to "local" mode? Only by looking if it took on the "local stratum" (10 in my case)?

With that configuration, the observed behavior when the connectivity to the external server fails is that the local hosts one after the other regards the external server as "stale". However, even though the configuration is identical on all nodes, this happens at completely different times on the three hosts - the first one usually after 9*poll interval (~10 minutes in my case, basically when "Reach" turns to 0), the last one after several hours.

The first host on which the external server becomes stale then switches to one of the other internal hosts, and so do the others. It takes half a day before the first host appears as orphan ("O" in the output of "chronyc selectdata"), and I have not managed to have all three hosts appear as orphans and agree on one of them as server. Usually, I end up with a cyclic constellation.

It appears I'm not using the orphan option properly. Any guidance?

Thanks,
  Carsten






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/