Commit Graph

39 Commits

Author SHA1 Message Date
Jonathon Anderson
f78f761be9 Error handling for /newroot mount during single-stage boot
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:48:20 -06:00
Jonathon Anderson
395fa2c283 Support requiring TLS for API access
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:48:20 -06:00
Jonathon Anderson
a886b4958b Simplify and clarify configuration
- changed "secure port" to "tls port"
- removed the --create flag for "wwctl configure tls"; made it the default behavior
- fixed a TLS creation bug in "wwctl configure --all"
- added logging to "wwctl configure tls" and "wwctl configure --all" (for the tls case)

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:42:26 -06:00
Jonathon Anderson
01eef7d88d Restore dracut's ability to download the runtime overlay
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:35:19 -06:00
Jonathon Anderson
673d7627b5 Move TLS files from keys/ to tls/
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:35:19 -06:00
Jonathon Anderson
226d81647b Add warewulf.crt to wwinit overlay
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:35:19 -06:00
Stephen Simpson
b5552aee07 Add IPMI bit-rate configuration and update documentation
Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
2025-10-17 11:04:43 -05:00
Jonathon Anderson
987eeb019b Fixed IPMI VLAN configuration
- Closed: #1892

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-02 13:53:11 +02:00
Jonathon Anderson
b98eae4b01 Refactor ignition support during dracut
- Control root device using the node/profile root field
- Add support for `/warewulf/wwinit.d` to run scripts during first stage
- Move first-stage ignition support to `/warewulf/wwinit.d/`
- Add `wwctl <node|profile> set --parttype`
- Add overlay template functions `SystemdEscape` and `SystemdEscapePath`
- Support configuring ignition with resources

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-06-30 23:19:31 -06:00
Christian Goll
917f191abe add support for ignition in configs
Signed-off-by: Christian Goll <cgoll@suse.com>
2025-06-17 01:34:23 -06:00
Jonathon Anderson
8c2723f16c Fixed a regression in SELinux support by restoring the /run mount during wwinit. #1910
https://systemd.io/INITRD_INTERFACE/

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-05-12 21:26:59 -06:00
Jonathon Anderson
d982fea6da Set an IPMI tag `vlan to configure the vlan during ipmiwrite`
- Closes: #1031

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-03-25 20:49:28 -06:00
Jonathon Anderson
4367b56120 Restore some default behaviors
- If `init` is not specified, wwinit looks for /sbin/init, /etc/init,
  and /bin/init, matching dracut behavior.
- assume ipxe template=default if not set
- Display a warning during overlay build if an overlay list is empty

Issues:

- Closes: #1808
- Closes: #1813

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-03-25 09:07:03 +01: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
4fa8601b75 Updated wwinit for clarity #1156
Also:

- Renamed /warewulf/wwinit to /warewulf/prescripts

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-17 02:48:16 -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
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
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
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
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
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
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
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
John Hanks
cbf9178f10 Provide sprig functions in overlay templates 2024-03-11 09:36:52 +01:00
Dietmar Rieder
f17ba7c62b Make mounting into sub-directoies work fixes #1073 2024-02-19 14:28:49 +01:00
Jonathon Anderson
6cc13455f6 Move overlays to rootfs and and set ownership
Move all overlay contents to a rootfs subdirectory, which was already
supported, and set ownership to root:root.

Closes #1078

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-02-17 10:39:06 -07:00