From: Samuel Mendoza-Jonas Date: Fri, 23 Sep 2016 03:06:48 +0000 (+1000) Subject: discover/pxe-parser: Parse only the first config X-Git-Tag: v1.3.1^0 X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=f64638f5a4f159297a74df9329afc6e73acf6d6b;hp=f64638f5a4f159297a74df9329afc6e73acf6d6b;p=petitboot discover/pxe-parser: Parse only the first config Commit 2163af5 "discover/pxe-parser: Retrieve configs asynchronously" added asynchronous loading of remote pxe filenames, but made an unintended change in behaviour to the PXE parser. Previously the parser would try a list of possible filenames, and parse the first one it found. However the above commit spawns an asynchronous job for every filename, and parses any that can be retrieved. It is a common configuration to have a machine-specific config and a 'fallback' default config, and the change means we could erroneously retrieve and parse both configs. Update the PXE parser so that asynchronous jobs are spawned sequentially. That is, spawn a job for the first filename and if not successful spawn another job for the next filename, and so on. Once a remote config is successfully retrieved, parse it and stop. Signed-off-by: Samuel Mendoza-Jonas ---