[PATCH] python indent bugfix in dns_hub.py

Jeremy Allison jra at samba.org
Tue Jan 22 06:21:23 UTC 2019


On Mon, Jan 21, 2019 at 09:57:27PM -0800, Jeremy Allison via samba-technical wrote:
> On Mon, Jan 21, 2019 at 09:18:02PM -0800, Jeremy Allison via samba-technical wrote:
> > On Mon, Jan 21, 2019 at 09:05:46PM -0800, Jeremy Allison via samba-technical wrote:
> > > > 
> > > > I'm guessing this could either be happening because the DC's DNS server
> > > > process is slow to process the query (because the DC only just started
> > > > up), or the CI machine is just heavily loaded and so it takes a while to
> > > > proxy the DNS query/response back and forth between the DC and client.
> > > 
> > > Great work Tim ! Could we fix this by adding
> > > retries to finddcs_cldap() ?
> > 
> > Is this the call to finddcs_cldap() called from
> > the python glue in:
> > 
> > source4/libnet/py_net.c
> > 
> > ? If so, adding 3x retries there would be fairly
> > simple.
> > 
> > Just wanted to thank you for the debugging work
> > here ! I tried but just couldn't reproduce this,
> > and thinking of adding a 2 second sleep in
> > dns_transaction_udp() to reproduce a slow server
> > was a great insight (obvious in hindsight, but
> > all the great insights usually are. i.e. I hate
> > myself for being too dumb to spot this :-). !
> 
> One last quick thought before I call it quits for
> the night :-).

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

which was set by Kai a *long* time ago (2012).

I think that's too short. Looking at the man
page for glibc the default they use is 5 seconds,
with a max of 30 seconds.

I think we need to make that value a tuneable,
or at the very least increase it to 5 seconds.

Jeremy.



More information about the samba-technical mailing list