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
458e23d0ae Set SLAVE=yes in ifcfg files when MASTER is set
- Fixes: #1980

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-09-04 17:44:25 -06:00
Jonathon Anderson
3a1e581f93 Better handling for missing NetDev.Device
- Closes: #1777

Overlays:
- ifcfg
- NetworkManager

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-24 22:27:36 -07:00
Christian Goll
4fcd12da40 Added test for onboot parameter
Signed-off-by: Christian Goll <cgoll@suse.com>
2025-02-20 01:41:11 -07: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
e5024038a6 Don't use DHCP for interfaces attached to a bond
- Fixes: #1743

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-20 10:16:59 +01:00
Jonathon Anderson
da26fa3061 Added support for a DNSSEARCH netdev tag in network configuration overlays
- Closes: #1256

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-14 09:07:09 +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
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
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