Commit Graph

238 Commits

Author SHA1 Message Date
Jonathon Anderson
73f34d0099 Restore server network auto-detection
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-06 20:46:20 -07:00
Jonathon Anderson
2e1466fc7e Fix handling of CIDR values in warewulf.conf
- Fixes: #1541
- Fixes: #1594

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-06 20:46:20 -07:00
Xu YANG
470f8c65d5 Merge pull request #1707 from anderbubble/remove-syslog
Remove `warewulf.conf:syslog`
2025-02-07 12:08:48 +09:00
Jonathon Anderson
4809641ef6 Re-order SSH key types to make ed25519 default
- Fixes: #981

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-05 23:27:29 -07:00
Jonathon Anderson
89721c6832 Remove warewulf.conf:syslog
- Fixes: #1606

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-05 21:58:39 -07:00
Jonathon Anderson
09503e583c Don't mount /run during wwinit
- Fixes: #1566

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-30 16:28:57 -07: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
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
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
8e8349ccd0 Fix newline handling in /etc/issue
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-19 13:58:19 -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
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
eff1edd038 Fixing tests in review of #1568
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-17 01:27:15 -07:00
Christian Goll
847d11611b creating exports from resource
Signed-off-by: Christian Goll <cgoll@suse.com>
2025-01-16 23:00:37 -07:00
Christian Goll
77bdfba816 create fstab from resource
Signed-off-by: Christian Goll <cgoll@suse.com>
2025-01-16 23:00: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
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
39707eaccf Add tests for localtime overlay and make configurable
localtime overlay can now be configured with a "localtime" tag.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-17 18:48:00 -07:00
Christian Goll
a2b3ae1308 added template for localtime
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-12-17 18:48:00 -07:00
Ian Kaufman
1d3cb6f153 Add Netplan NIC support for Debian/Ubuntu #1463
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-10 19:41:27 -07:00
Jonathon Anderson
a844379bc5 Merge --kerneloverride into --kernelversion
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:28 +01:00
Christian Goll
d1c734732f better udev rules
Renamed 70-ww4-netname.rules.ww to 70-persistent-net.rules.ww.

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-13 17:44:48 -07:00
Timothy Middelkoop
e4a721d87e Remove debian.interfaces from nodes.conf
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2024-11-12 14:46:12 +01:00
Timothy Middelkoop
df6242d66f Fix dhcp template for static template
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2024-11-12 14:46:06 +01: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
a7325b6ffa Remove WW_INTERNAL
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:54 -07:00
Jonathon Anderson
3cb55a68de Re-write 50-ipmi
This re-write checks, implements, and reports on each WWIPMI variable
individually.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-07 23:06:27 -07:00
Christian Goll
c23537e74a don't update ipmi if there is no password
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-07 23:06:26 -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
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
36d8984d96 Minor refactor of wwinit and build-ipxe scripts
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-31 10:26:31 -06:00
Ian Kaufman
f3a1b43360 POSIX fixes for #1464
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-31 09:49:48 -06:00
Jonathon Anderson
36d6ea1b7b NetworkManager manages any known device or mac
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-30 06:04:44 +00:00
xu yang
9f10e90fdb fix unmanaged issue
Signed-off-by: xu yang <xyang@ciq.com>
2024-10-30 06:04:40 +00:00
Jonathon Anderson
4b4234994c Misc whitespace handling fixes
Also fixes handling of mtu value in Debian networking.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-18 00:31:19 -04: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
c39fa75048 Fix a missing string quote
Regression introduced in #1401

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-30 16:03:09 -06:00
Jonathon Anderson
cdbabfc834 Update IgnitionJson to sort the list of file systems
- Closes #1433

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-27 18:15:15 -06: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
a639c97a25 Fix a "wicked" ifcfg overlay regression
Regression introduced in #1410.

See also #1413 for underlying issue.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-25 14:28:47 -06:00
Jonathon Anderson
216b55af07 Add autoconnect / onboot support to Suse wicked
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-23 11:37:21 -06:00
Jonathon Anderson
f88f3507ba Add autoconnect / onboot support to Debian networking
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-23 11:37:05 -06:00