Re: [chrony-users] hostnames vs. IP address in chrony.conf

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


On 30/10/2012 19:09, Bill Unruh wrote:
On Tue, 30 Oct 2012, John.Florian@xxxxxxxx wrote:

What strategy does chronyd use to resolve the hostnames to IP addresses
for its upstream time servers?  I'm guessing it does so once at startup
and then caches the result for all future use.  Is that correct?

I had a number of systems I had to twiddle with today because chronyd
didn't seem to follow an IP address change we made in DNS.  I had
specifically used a name via DNS to cope with such a situation so was
surprised by this behavior.  To me it's the first reason to use names ...
an abstraction layer allowing redirections.

The alternative is to have chrony do a dns lookup everytime it wants to send
out a packet. That makes a much larger load on the host system to running
chrony. "Send out one ntp packet and receive one ntp packet" vs " Send out a
dns query (which typically first goes to /etc/hosts, and then out the net to
the dns server, get the answer and interpret the answer, then send out and
receive the dns packet. At the same time, try to make sure that if the ip
address changes of a server, that the records for that server remain attached
to each other even if the dns address changes. Remember that chrony keeps the
up to the past 64 queries to a server, and must make sure that all queries to
the same server remain associated with the same server. Far easier to use IP
to make that association. Chrony also keeps info for a server across various
runnings of chrony if I recall correctly.
Could chronyd not be made to pay attention to the TTL of the IPs it resolves?
That would truly be "using IP to make that association".

Tom


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