summaryrefslogtreecommitdiffstats
path: root/discover/device-handler.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-03-23 17:42:37 +1100
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-07-11 14:32:26 +1000
commit5314cebf5fe766bdca6c779e785b8dfaa3808142 (patch)
tree133934cb709b765a7c1acd06433328fc53cc12bd /discover/device-handler.c
parent1ac262ed5224463c01525c680d1f58f7df48b943 (diff)
downloadtalos-petitboot-5314cebf5fe766bdca6c779e785b8dfaa3808142.tar.gz
talos-petitboot-5314cebf5fe766bdca6c779e785b8dfaa3808142.zip
discover/paths: Add network jobs to queue
Load tasks that start before the network is available will fail. Rather than just fail these tasks, add them to a queue that is processed once the network is ready. This helps users who try to request files early in setup, as well as very early running load tasks. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r--discover/device-handler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index a0c21b7..730be85 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -361,6 +361,7 @@ void device_handler_reinit(struct device_handler *handler)
/* Cancel any remaining async jobs */
process_stop_async_all();
+ pending_network_jobs_cancel();
/* free unresolved boot options */
list_for_each_entry_safe(&handler->unresolved_boot_options,
@@ -1083,6 +1084,8 @@ int device_handler_dhcp(struct device_handler *handler,
_("Processing DHCP lease response (ip: %s)"),
event_get_param(event, "ip"));
+ pending_network_jobs_start();
+
/* create our context */
ctx = device_handler_discover_context_create(handler, dev);
talloc_steal(ctx, event);
OpenPOWER on IntegriCloud