Commit Graph

13 Commits

Author SHA1 Message Date
Jonathon Anderson
3919dea887 Fix display of dotted field names
- Fixes: #1825

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-03-19 02:59:47 -06:00
Jonathon Anderson
6bfcfc5fda Prevent merging of zero-value net.IP fields
- Fixes: #1710

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-06 16:43:21 -07:00
Jonathon Anderson
e3d90cd323 Prefer parent profile values over child profile values.
- Fixes: #1672

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-03 12:16:12 +01:00
Jonathon Anderson
032db29f87 Don't populate NetDevs[].Type or NetDevs[].Netmask during upgrade
- Closes: #1661

NetDev defaults don't behave quite the same as standard fields, because they
need to be set per-device. Meanwhile, trying to set a value may erroneously
override values that are on the default profile.

Switch this to a warning rather than attempting to take explicit action.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-03 11:00:12 +01:00
Jonathon Anderson
f931eb6a0a Fixed negation for slice field elements during profile/node merge
- Fixes: #1677

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-01 13:32:10 +01:00
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
a8fab3e844 Enhancements for node.Field formatting
- Complex values are now marshalled as json
- Booleans are now represented as truth values

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-19 12:55:19 -07:00
Jonathon Anderson
b50fb3f3ef Fix handling of net.IP during node merge
Because net.IP is derived from []byte, it was being handled by mergo as a
slice. This adds an additional transformer that handles net.IP specifically,
and also watches for this type in field tracking.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-18 10:07:19 -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
bc52f3b7d7 Recommended changes from review of #1568
- Make Resources an `interface{}` to support arbitrary yaml
- Remove `wwctl resource` as incompatible with arbitrary yaml
- Revert changes to host overlay templates
- Remove NFS mount options from warewulf.conf
- Replace NFS support / resource prefix with "fstab" resource
- Move resources to profiles
- Migrate warewulf.conf mounts to nodes.conf with `wwctl upgrade`
- Add documentation

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-17 10:33:37 -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
83af6021c0 Recast Profiles as a Profile field and support recursion
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-25 09:10:05 -07:00
Jonathon Anderson
1a3d037703 Refactor GetNode merging with new MergeNode method
- Adds many tests for node+profile merging
- Ensures that tracked fields match mergo results

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-25 09:07:28 -07:00