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

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


On Wed, 31 Oct 2012, Tomalak Geret'kal wrote:

On 31/10/2012 10:12, Miroslav Lichvar wrote:
 On Tue, Oct 30, 2012 at 10:30:45PM +0000, Tomalak Geret'kal wrote:
>  I feel like we've been over this sufficiently to solve the problem.
>  Chrony could near-trivially poll the resolver when required with
>  such a mechanism being rate limited if you're worried about syscall
>  performance, and the history can remain IP-keyed.
 How exactly would chrony do that? As Unruh pointed out, getaddrinfo()
 doesn't probvide the TTL and calling it before sending every NTP packet
 can easily result in making a DNS query over network for every call
 unless a local caching is running (nscd, dnsmasq). Also, with
 pool.ntp.org the addresses are rotated in the results, I think
 that would be difficult to handle correctly.

 There is another problem with getaddrinfo(), it blocks. That can be
 solved by using threads or forking the resolving code as ntpd does.

 The best fix for all these problem would probably be using an async
 DNS library which returns the TTL. But I didn't find a good one the
 last time I checked. I think it should be small, well maintained,
 GPLv2 compatible and available also on other systems than Linux. Any
 tips?

Again, chrony doesn't need the TTL. Caching is handled by the resolver.
getaddrinfo() blocking is a more concrete problem to solve - good spot.

So, TTL was advocated as a way to tell chrony how often to ask for an IP
address.  If chrony does not know the TTL it would have to query the dns each
time it sent out a packet. But that has huge problems. As Miroslav points out,
pool.ntp.org (or any of the other pool servers) returns a different IP each
time it is called. Thus it would be impossible for chrony to run since it
could not maintain history files, and it must have them.


Tom



--
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/

--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


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