[Babel-users] Fwd: ahcpd ntp_server option

Juliusz Chroboczek jch at pps.univ-paris-diderot.fr
Thu Feb 12 21:50:23 UTC 2015


> I have been playing with chrony. Attached is my ahcp-local.sh. This is the
> only way I've been able to get chrony to sync the time. Do you have any
> comments on this?

Yes, two.

1. AHCP_NTP_SERVER is, in general, a space separated list of potential
servers.  So instead of

  ntp_server=$AHCP_NTP_SERVER
  ...

you should be doing

  for ntp_server in $AHCP_NTP_SERVER; do
      ...
  done

2. There's no need to ping the server -- the fact that the server is
unreachable at boot time doesn't mean it won't become available later.

Chrony is a well-written, robust piece of software.  If a server doesn't
respond, chrony will send it requests with an exponentially decaying
interval -- first every 64 seconds, then every 128 seconds, etc. until it
reaches 1024 seconds (20 minutes).

So just pass the whole list of servers to chrony, whether they're
reachable or not, and trust chrony to do the right thing.

-- Juliusz



More information about the Babel-users mailing list