Commit Graph

14 Commits

Author SHA1 Message Date
Jonathon Anderson
2bad789f4f Fix newline handling in file, softlink, and ImportLink template functions
Use state-based routing instead of sentinel strings, so whitespace-trimming
syntax (e.g. `{{- file "name" -}}`) correctly creates all named files and
symlinks.

Fixes: #2118

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
Co-authored-by: Christian Goll <cgoll@suse.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-04-17 22:51:10 -06:00
Jonathon Anderson
fd8de8bfab Add WWbool.BoolDefaultTrue()
New support in WWbool for booleans that default "true."

Used primarily for NetDev.OnBoot.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-20 01:41:10 -07:00
Jonathon Anderson
87da57d1a2 Return "" when NetDev.IpCIDR is empty
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-10 10:26:01 +01:00
Jonathon Anderson
c209dadc1f Update network interface bonding configuration and documentation
- Closes: #1482
- Closes: #1280

This also corrects poor handling of whitespace around the "file" function
throughout the templates, given experiences with the network templates while
implementing the bond behavior. Since the file function actually does produce
output (that is parsed by Warewulf itself) it should not collaps prefix
whitespace.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-21 09:42:27 -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
8a602e8a76 Return OnBoot to wwtype.WWbool
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:55 -07:00
Jonathon Anderson
0cb4db946c Add support for VLANs and static routes #1257
- NetworkManager
- wicked
- ifcfg
- debian.network_interfaces

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-06 19:17:19 -07:00
Christian Goll
2e6b648e09 added vlan for wicked
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-06 19:17:19 -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
c08cd82e68 don't use net.IPMask
net.IPMask doesn't have any advantages, as it would
marshalled to
mask:
  - 1
  - 2
  - 3
  - 4

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30: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