Commit Graph

21 Commits

Author SHA1 Message Date
Jonathon Anderson
51f61f93c4 Refactor kernel args as a slice
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-21 09:52:58 -07:00
Jonathon Anderson
ef376e97de Improved template variables debug template and documentation
- Closes #1097

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-21 09:42:27 -07:00
Jonathon Anderson
d6d1e37c83 Merge pull request #1641 from anderbubble/rename-container-node-image
Rename "container" to "image"
2025-01-23 21:45:41 -07:00
Jonathon Anderson
45a690ca4e Rename "container" to "image"
- Updated `wwctl upgrade` to handle updates
- Maintained `.Container` and `.ContainerName` in tstruct
- Added `ContainerName()` methods to node and profile objects
- Added `--container`, `-C` aliases to wwctl commands (`<node|profile> <add|set>`)
- Added `wwctl container` alias
- Added support for `container_exit.sh` if `image_exit.sh` is not found

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-19 05:54:19 -07:00
Jonathon Anderson
57d28c5bc9 Expand nodes when rendering overlay templates
Before #1628, all default constructors for nodes and profiles attempted to
construct objects with pre-populated empty fields (e.g., for pointers to member
structs and for collections that default to nil). Changes to MergeNode in #1629
changed this behavior intentionally to simplify the generation of minimal json;
but this had the unintended side-effect of breaking existing templates that may
now encounter a nil pointer, particularly when accessing member structs.

Introduced here, the Expand() methods on Node and Profile are now responsible
for populating such fields, and Node.Expand() is now called during template
processing.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-19 04:26:01 -07:00
Jonathon Anderson
dae8d004b3 Use Node literal in MergeNode, not EmptyNode()
EmptyNode populates empty sub-structs, which interferes with omitempty during
serialization.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-18 09:48:26 -07:00
Jonathon Anderson
a18913924d Benchmarking for wwctl overlay build
- Benchmarks overlay build in an environment with 1000 nodes
- Updates testenv to support both benchmarks and tests

To execute:

```
go test github.com/warewulf/warewulf/internal/app/wwctl/overlay/build -bench Benchmark_Overlay_Build
```

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-25 12:34:23 -07:00
Jonathon Anderson
717241aa18 Add methods to config.New().Paths for site and distribution overlays
- SiteOverlaySourcedir() uses WWOverlaydir (/var/lib/warewulf/overlays)
- DistributionOverlaySourcedir() uses Datadir (/usr/share/warewulf/overlays)
- config.New().Warewulf.DataStore moved to config.New().Paths.Datadir
- FindOverlays() ignores missing distribution overlay directory

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-20 11:12:47 +01:00
Jonathon Anderson
a844379bc5 Merge --kerneloverride into --kernelversion
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:28 +01:00
Jonathon Anderson
cec95b14f0 Update default warewulfd port to match initial configuration
We've been shipping a warewulf.conf that defines the warewulfd port as
9873, and a firewalld service that uses this port as well; but the
default value in the YAML data-structure has been 9983.

This changes the default port to 9873 to match the configuration we've
been shipping, and removes the port from the initial configuration file
(to use the default value).

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-06 19:07:05 -07:00
Jonathon Anderson
bb5d1d17ed Revert NetDevs.Manual back to NetDevs.OnBoot
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 23:00:57 -04:00
Jonathon Anderson
805704ce08 Minimize nodes.conf for overlay tests
Also updated issue to show both configured and detected address.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 16:43:31 -04:00
Christian Goll
0c6e7cc58a fixes for split overlays
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:39:54 -04:00
Christian Goll
9fdb9ca792 updated overlays
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:54 -04:00
Jonathon Anderson
053dd9953a Split overlays into discrete functionality and test
- Closes #987

To make the overlays testable in isolation, and after discussion with
the TSC, removed host/time/source from overlay files.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-26 10:48:38 -06:00
Jonathon Anderson
a164498aa5 Documentation for SSH key type configuration
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-05-01 14:27:39 -06:00
Jonathon Anderson
ab881dbb37 Add Overlay variable to debug template
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-04-17 21:40:36 -06:00
Jonathon Anderson
6cc13455f6 Move overlays to rootfs and and set ownership
Move all overlay contents to a rootfs subdirectory, which was already
supported, and set ownership to root:root.

Closes #1078

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-02-17 10:39:06 -07:00
Jonathon Anderson
869dce388c Fix newline when printing AllNodes
Fixes a bug in the debug template that was causing the next node to be
printed on the same line as the last line of the previous node.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-02-21 01:20:16 -07:00
Jonathon Anderson
b97b2f3ade Removed whitespace damage from new debug template
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-12-18 21:46:21 -07:00
Jonathon Anderson
2c52700574 New debug overlay with template
A new debug overlay template serves as an example of how to access all
template variables which can also be rendered against any node to
display all template variable values.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-12-16 10:48:47 -07:00