Rendering overlay templates requires fetching and populating / merging all
other nodes, because overlay templates have access to all cluster node info.
This was previously being done for each template render, but is not being done
once for each render operation and re-used for each template render.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
As part of reviewing this PR, I expanded the test definitions to make it
easier to discern the intent of each test at a glance. In so doing I
understood most tests behaving as normal, but I did make a few small
changes:
- Some tests no longer produce any errors, so remove this variable from
the test definitions.
- Replace comma-separated overlay definitions with explicit slices.
Splitting comma-separated strings led to erroneous behavior where a
null overlay list was processed as a single null overlay rather than
an empty slice.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
The recent PR #883 replaced the standard overlay naming convention with
static names for each of the runtime and wwinit/system contexts; but the
method by which it left the "legacy" naming convention in place led to a
bug where warewulfd was still attempting to serve overlays with the
previous naming convention, though this name wasn't being built.
This PR refactors contextual overlay image naming to be, I think, a more
typical golang pattern, and updates affected code to match.
This PR also included tests for all functions modified by this change.
Fixes#896
Signed-off-by: Jonathon Anderson <janderson@ciq.com>