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

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


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.

Tom

--
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/