~newell-jensen/maas/fix-1608555-1631079

Viewing all changes in revision 5453.

  • Committer: MAAS Lander
  • Author(s): Lee Trager
  • Date: 2016-10-05 23:33:58 UTC
  • mfrom: (5435.1.3 lp1630394)
  • Revision ID: maas_lander-20161005233358-zmt6jfd10zs92wkl
[r=blake-rouse][bug=1630394][author=ltrager] Always wait to cache_boot_sources before importing resources.

On first run MAAS sets the default boot source in the ImportResourcesService. This causes a signal which refreshes the boot source cache. To prevent the cache from being updated twice MAAS just let the signal handle updating the cache and wasn't waiting for it to complete. This worked as MAAS starts downloading the actual files later on in the process. The way bootloaders are picked are by looking at what bootloaders are available in BootSourceCache. As this happened earlier in the process they were missed. This modifies the ImportResourcesService to always wait on refreshing the cache but modifying the signal to only refresh the cache if a boot source already exists.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: