Commit Graph

220 Commits

Author SHA1 Message Date
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
Jonathon Anderson
e21c266ded Add autoconnect / onboot support to NetworkManager
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-23 11:36:49 -06:00
Jonathon Anderson
c03acabd82 Further simplification of wwinit/init
- Closes #1093
- Extends #822

Restores the acceptable use of the initramfs options to avoid deprecation in a
v4.5.x maintenance release.

Moves mounting of kernel file systems earlier in the script so that we
can use the same reboot pattern for all error conditions.

Flattens nested if/else logic.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-17 23:11:24 -04:00
Adam Michel
76908909a0 Refactor of wwinit/init to more properly address rootfs options
- Closes #1093
- Show rootfs type on-screen during boot.
- Fix logic flow for deciding to pivot or not.
- Add Informational message about 'initramfs' option.
- Allow unset WWROOT to continue to wwinit.

Signed-off-by: Adam Michel <elfurbe@furbism.com>
2024-09-17 23:07:49 -04:00
Jonathon Anderson
97620ebba3 Set mpol=interleave on dracut tmpfs.
- Closes #1347
- Closes #1348

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-16 23:17:14 -04:00
Jonathon Anderson
f620b7afe2 Restore previous behavior of static dhcp
- Disable dynamic pool when using static dhcp
- Populate configuration of non-primary interfaces for static dhcp

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-07-01 21:43:12 -06:00
Christian Goll
75aad7d2ca set correct asset tag for dnsmasq template
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-06-24 10:42:12 +02:00
Josh Burks
dd6b419440 added asset-tag to ipxe script request fix #1110
Signed-off-by: Josh Burks <jeburks2@asu.edu>
2024-06-18 09:23:18 -07:00
Jonathon Anderson
9500487ad3 Improve the detection of SELinux capable rootfs
initramfs uses tmpfs regardless of whether root=tmpfs in Warewulf. As
such, 90-selinux needs to be updated to detect the actual provenance of
/, rather than the configured setting.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:20:12 -04:00
Jonathon Anderson
53dae60e20 New, optional dracut.ipxe configuration
dracut.ipxe boots an initramfs detected in the container image. This
required a few small changes to warewulfd and the wwinit overlay to
accommodate the dracut initramfs configuring the network interface
before wwinit:

- Include .NetDevs in the ipxe configuration template, so that dracut
  can configure interfaces with the correct names.

- Configure NetworkManager to not keep the initramfs configuration, in
  stead applying the configuration found by wwinit.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:20:09 -04:00
Christian Goll
0990c3ecdb Merge pull request #1187 from mslacken/SetSSHKeys
allow the user to specify ssh key types
2024-05-06 11:12:06 +02:00
snehring
6e6344830d Reorder dnsmasq config template to put iPXE last.
Signed-off-by: snehring <snehring@iastate.edu>
2024-05-01 16:22:06 -05: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
7046c6dc8c Use the first configured ssh key type for authn
Previously, the authentication key was always generated using rsa. Now
it uses the first configured ssh key type.

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
7099b08db5 Replace slice in templates with sprig substr
sprig replaces slice with a function that only operates on sprig lists.
substr is required for use with strings.

- Fixes: #1139

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-03-17 14:51:18 -06:00
Dietmar Rieder
feb86ce11a Prevent Networkmanager from trying to optain IP address via DHCP
on unused/unmanaged network interfaces. Only act on interfaces.
configured via wwctl otherwise system NetworkManager-wait-online.service.
runs into a time out.
2024-03-12 09:47:34 +01:00
John Hanks
12496d89c7 Fixing result of over aggressive sed expression. 2024-03-11 09:36:56 +01:00
John Hanks
8877cebf87 Swapping replace from sprig for our tr in overlays. 2024-03-11 09:36:56 +01:00