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

Simon Kelley simon at thekelleys.org.uk
Thu Mar 26 11:53:54 GMT 2020


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 at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list