]> git.ozlabs.org Git - petitboot/commitdiff
discover/pxe-parser: Retrieve configs asynchronously
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Mon, 16 May 2016 06:06:30 +0000 (16:06 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 28 Jun 2016 06:17:21 +0000 (16:17 +1000)
Depending on the configuration of the DHCP server and the network, tftp
requests made by the pxe parser can timeout. The pxe parser makes these
requests synchronously so several timeouts can block the server
completely for several minutes, leaving the server unresponsive to UI
requests.

Rework the pxe parser such that it handles the result of each tftp
request in a callback, which can complete after iterate_parsers() has
returned. Each callback is allocated its own conf_context which takes a
talloc reference on the discover_context so that each callback can
commit new boot options after the initial iterate loop has completed.
This also means talloc_unlink must be used instead by the original
parent of the discover_context.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

No differences found