[PATCH] python indent bugfix in dns_hub.py

Jeremy Allison jra at samba.org
Tue Jan 22 07:42:27 UTC 2019


On Tue, Jan 22, 2019 at 08:29:42AM +0100, Volker Lendecke via samba-technical wrote:
> On Mon, Jan 21, 2019 at 10:21:23PM -0800, Jeremy Allison wrote:
> > OK, can't quite call it quits - couldn't sleep
> > whist this was bugging me :-).
> > 
> > The 2 second thing was nagging at me. Checking
> > libcli/dns/dns.c we have:
> > 
> > #define DNS_REQUEST_TIMEOUT 2
> 
> My gitlab-ci now has an experimental patch that bumps this to 10. I
> had code that converts source4/resolve/dns_ex.c to the "new" code, and
> that failed reliably with something similar. If that goes through, I
> think we have a winner.

I have a gitlab-ci running with it bumped up to 5 :-).

Yeah, I think this is the correct fix.

> Would it make sense to do all the DNS traffic in selftest via stream
> sockets with larger timeouts? This might be more deterministic.

I think 10 seconds via udp should be enough.
We want to behave the same way in test we
behave in production as far as possible I
think, and using TCP for all DNS lookups
is a bit overkill I think.

Turns out the glibc dns timeout is configurable
via a timeout:n parameter in resolv.conf.

As we're already reading resolv.conf maybe we can set
the default to 10, and if the timeout:n is set
in resolv.conf pass that into the lower level
code by parsing it up from parse_resolvconf_fp().

That allows people to set it to taste in production
(or in our test code) and re-uses the existing
resolv.conf convention. We just need to add a
'timeout' parameter to dns_cli_request_send()
which is only called in 2 places.



More information about the samba-technical mailing list