Re: [Dnsmasq-discuss] : Dns lookup failures if one of the upstream servers are down

2020-03-26 Thread Abhishek Patti
Hi Everyone

We are using dnsmasq version 2.80 and have multiple upstream servers
configured, with all-servers flag set. We noticed that if first upstream
server fails then we get dns lookup failures even though other upstream
servers are working fine.

Thank You
Abhishek Patti

On Thu, Mar 26, 2020, 5:28 AM <
dnsmasq-discuss-requ...@lists.thekelleys.org.uk> wrote:

> Send Dnsmasq-discuss mailing list submissions to
> dnsmasq-discuss@lists.thekelleys.org.uk
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> or, via email, send a message with subject or body 'help' to
> dnsmasq-discuss-requ...@lists.thekelleys.org.uk
>
> You can reach the person managing the list at
> dnsmasq-discuss-ow...@lists.thekelleys.org.uk
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dnsmasq-discuss digest..."
>
>
> Today's Topics:
>
>1. TFTP storage issue prevents other dnsmasq services (DHCP/DNS)
>   to run (Ercolino De Spiacico)
>2. Re: TFTP storage issue prevents other dnsmasq services
>   (DHCP/DNS) to run (Geert Stappers)
>3. Re: TFTP storage issue prevents other dnsmasq services
>   (DHCP/DNS) to run (Simon Kelley)
>
>
> --
>
> Message: 1
> Date: Thu, 26 Mar 2020 09:15:09 +
> From: Ercolino De Spiacico 
> To: "dnsmasq-discuss@lists.thekelleys.org.uk"
> 
> Subject: [Dnsmasq-discuss] TFTP storage issue prevents other dnsmasq
> services (DHCP/DNS) to run
> Message-ID:
> <
> am7p191mb08077ea4fa6296b4aa48d338b2...@am7p191mb0807.eurp191.prod.outlook.com
> >
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> It seems like enabling TFTP like:
>
> enable-tftp
> tftp-root=/mnt/usb/TFTP
> dhcp-boot=pxelinux.0,,192.168.0.1
>
> But experiencing an system storage issue (usb failure, unable to mount,
> etc) takes the full dnsmasq down e.g. prevent from running at all
>
> Can I suggest for dnmasq to take a softer approach when this happens and
> just skip the TFTP process execution rather than affect all the other
> internal services like DHCP and DNS?
>
> More than else it's that "external factor" that sucks in this situation.
>
> Thanks
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20200326/fcc89dcb/attachment-0001.html
> >
>
> --
>
> Message: 2
> Date: Thu, 26 Mar 2020 12:14:33 +0100
> From: Geert Stappers 
> To: dnsmasq-discuss@lists.thekelleys.org.uk
> Subject: Re: [Dnsmasq-discuss] TFTP storage issue prevents other
> dnsmasq services (DHCP/DNS) to run
> Message-ID: <20200326111433.i2gl53t73l3ix...@gpm.stappers.nl>
> Content-Type: text/plain; charset=utf-8
>
> On Thu, Mar 26, 2020 at 09:15:09AM +, Ercolino De Spiacico wrote:
> > It seems like enabling TFTP like:
> >
> > enable-tftp
> > tftp-root=/mnt/usb/TFTP
>   tftp-no-fail
> > dhcp-boot=pxelinux.0,,192.168.0.1
> >
> > But experiencing an system storage issue (usb failure, unable to mount,
> > etc) takes the full dnsmasq down e.g. prevent from running at all
> >
> > Can I suggest for dnmasq to take a softer approach when this happens
> > and just skip the TFTP process execution rather than affect all the
> > other internal services like DHCP and DNS?
> >
> > More than else it's that "external factor" that sucks in this situation.
>
> Yes, hence the option`tftp-no-fail`
>
> Quoting the manual page
>
>--tftp-no-fail
>   Do  not abort startup if specified tftp root
>   directories are in?accessible.
>
>
> > Thanks
>
> No problem.  Feel welcome to also report that `tftp-no-fail` does what
> you expect from it.
>
>
> Regards
> Geert Stappers
> --
> Silence is hard to parse
>
>
>
> --
>
> Message: 3
> Date: Thu, 26 Mar 2020 11:53:54 +
> From: Simon Kelley 
> To: dnsmasq-discuss 
> Subject: Re: [Dnsmasq-discuss] TFTP storage issue prevents other
> dnsmasq services (DHCP/DNS) to run
> Message-ID: <42e7d990-df47-6ca4-45c1-fe8d44305...@thekelleys.org.uk>
> Content-Type: text/plain; charset=windows-1252
>
> On 26/03/2020 09:15, Ercolino De Spiacico wrote:
> > It seems like enabling TFTP like:
> >
> > enable-tftp
> > tftp-root=/mnt/usb/TFTP
> > dhcp-boot=pxelinux

Re: [Dnsmasq-discuss] Still investigating delay on first dns query - more info

2020-03-26 Thread Chris Green
On Thu, Mar 26, 2020 at 12:02:45PM +, Simon Kelley wrote:
> On 23/03/2020 13:25, Chris Green wrote:
> > 
> > I'm running dnsmasq version 2.76 on a Raspberry Pi.  The systems
> > seeing the delay when they send a query are (mostly) running xubuntu
> > 19.10.
> > 
> > The delay only occurs when querying names on the LAN, requests for
> > external names run normally.  It makes no difference whether I give a fully
> > qualified name or just the machine name (the domain gets added by the
> > 'search' option in /etc/resolv.con anyway).
> > 
> > It appears to be something to do with IPV6 and  records (or lack
> > of them) that causes the issue but I'm still stumped as to how to fix
> > it.  
> > 
> > Having set 'log-queries=extra' in /etc/dnsmasq.conf I see the
> > following in /var/log/syslog when I query (using 'host') the name
> > 'esprimo' twice from my laptop after booting (booting the laptop that
> > is).
> > 
[snip log]
> > 
> > So for some reason first time round the querying system asks
> > repeatedly for the  record, then waits 5 seconds, asks again and
> > then gives up.  But it only does this the first time it sends the
> > query.  (I suspect that the delay re-occurs after a long idle time but
> > I can't reproduce the delay by clearing the systemd resolvctl cache)
> > 
> > I realise this probably isn't directly a dnsmasq problem but I'd
> > really appreciate any suggestions or workarounds that might help me
> > fix this issue.  I can easily add more debug flags or configuration if
> > they might help.
> > 
> 
> 
> Dnsmasq looks to be doing the right thing here, if one assumes that what
> it sends is the same as what it logs (and I have not reason to believe
> it isn't).
> 
> Given the MX query, it looks like the originator may be a mail transfer
> agent (sendmail, exim and friends). Can you determine what is making the
> queries and maybe configure it not to use IPv6?
> 
> 
Yes, thank you Simon.  It just dawned on me (thinking about it in bed
last night) that the log only shows what dnsmasq *sent* and not what
was received or acted on at the other end.  I think my next job is
probably to set up wireshark or something like it and actually
observer what is going in and out of the client system.

-- 
Chris Green

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] TFTP storage issue prevents other dnsmasq services (DHCP/DNS) to run

2020-03-26 Thread Simon Kelley
On 26/03/2020 09:15, Ercolino De Spiacico wrote:
> It seems like enabling TFTP like:
> 
> enable-tftp
> tftp-root=/mnt/usb/TFTP
> dhcp-boot=pxelinux.0,,192.168.0.1
> 
> But experiencing an system storage issue (usb failure, unable to mount,
> etc) takes the full dnsmasq down e.g. prevent from running at all
> 
> Can I suggest for dnmasq to take a softer approach when this happens and
> just skip the TFTP process execution rather than affect all the other
> internal services like DHCP and DNS?


This is much easier said than done, because file read/write can't be
done in a non-blocking way in Unix/Linux. AFAIK all ordinary files are
by definition  non-blocking, and if they do block on the underlying
device, that's just tough; there's no way to get your process scheduled
again until the drive returns data.

I think the lesson from this is: don't put any files dnsmasq accesses
(tftp sources, DHCP lease file, log files, configuration files) on
devices that may go away: copy the data to an internal drive.

> 
> More than else it's that "external factor" that sucks in this situation.


Agreed, and your message will lie in the list archive as a warning to
anyone else tripping over the same gotcha. That's a good thing.


Cheers,


Simon.

> 
> Thanks
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Still investigating delay on first dns query - more info

2020-03-26 Thread Simon Kelley
On 23/03/2020 13:25, Chris Green wrote:
> I'm still trying to work out why the first DNS query to dnsmasq
> running on a server on my LAN suffers a 5 second delay but subsequent
> requests don't see the delay.  
> 
> I'm running dnsmasq version 2.76 on a Raspberry Pi.  The systems
> seeing the delay when they send a query are (mostly) running xubuntu
> 19.10.
> 
> The delay only occurs when querying names on the LAN, requests for
> external names run normally.  It makes no difference whether I give a fully
> qualified name or just the machine name (the domain gets added by the
> 'search' option in /etc/resolv.con anyway).
> 
> It appears to be something to do with IPV6 and  records (or lack
> of them) that causes the issue but I'm still stumped as to how to fix
> it.  
> 
> Having set 'log-queries=extra' in /etc/dnsmasq.conf I see the
> following in /var/log/syslog when I query (using 'host') the name
> 'esprimo' twice from my laptop after booting (booting the laptop that
> is).
> 
> First 'host esprimo':-
> Mar 23 12:59:06 newdns dnsmasq[4256]: 54 192.168.1.92/56886 query[A] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 54 192.168.1.92/56886 /etc/hosts 
> esprimo.zbmc.eu is 192.168.1.3
> Mar 23 12:59:06 newdns dnsmasq[4256]: 55 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 55 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 56 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 56 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 57 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 57 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 58 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 58 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 59 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 59 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 60 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 60 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 61 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 61 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 62 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 62 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 63 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 63 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 64 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 64 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 65 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 65 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 66 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 66 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 67 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 67 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 68 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 68 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 69 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 69 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 70 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 70 192.168.1.92/37906 config 
> esprimo.zbmc.eu is NODATA-IPv6
> Mar 23 12:59:06 newdns dnsmasq[4256]: 71 192.168.1.92/37906 query[] 
> esprimo.zbmc.eu from 192.168.1.92
> Mar 23 12:59:06 newdns dnsmasq[4256]: 71 192.168.1.92/37906 config 
> esprimo

Re: [Dnsmasq-discuss] TFTP storage issue prevents other dnsmasq services (DHCP/DNS) to run

2020-03-26 Thread Geert Stappers
On Thu, Mar 26, 2020 at 09:15:09AM +, Ercolino De Spiacico wrote:
> It seems like enabling TFTP like:
> 
> enable-tftp
> tftp-root=/mnt/usb/TFTP
  tftp-no-fail
> dhcp-boot=pxelinux.0,,192.168.0.1
> 
> But experiencing an system storage issue (usb failure, unable to mount,
> etc) takes the full dnsmasq down e.g. prevent from running at all
> 
> Can I suggest for dnmasq to take a softer approach when this happens
> and just skip the TFTP process execution rather than affect all the
> other internal services like DHCP and DNS?
> 
> More than else it's that "external factor" that sucks in this situation.

Yes, hence the option`tftp-no-fail`

Quoting the manual page

   --tftp-no-fail
  Do  not abort startup if specified tftp root
  directories are in‐accessible.


> Thanks

No problem.  Feel welcome to also report that `tftp-no-fail` does what
you expect from it.


Regards
Geert Stappers
-- 
Silence is hard to parse

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] TFTP storage issue prevents other dnsmasq services (DHCP/DNS) to run

2020-03-26 Thread Ercolino De Spiacico
It seems like enabling TFTP like:

enable-tftp
tftp-root=/mnt/usb/TFTP
dhcp-boot=pxelinux.0,,192.168.0.1

But experiencing an system storage issue (usb failure, unable to mount, etc) 
takes the full dnsmasq down e.g. prevent from running at all

Can I suggest for dnmasq to take a softer approach when this happens and just 
skip the TFTP process execution rather than affect all the other internal 
services like DHCP and DNS?

More than else it's that "external factor" that sucks in this situation.

Thanks
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss