Commit Graph

44 Commits

Author SHA1 Message Date
Sujeev-Uthayakumar
0f3f0c3ccf Make naming consistent with regexp.MatchString 2026-01-30 18:06:06 -05:00
Timothy Middelkoop
4f58845a9e Add IPv6 support for Dnsmasq and NetworkManager
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2025-11-27 01:56:18 +00:00
Timothy Middelkoop
f9f8fe3673 Remove unused/unneeded Ipv6net config
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2025-11-16 15:07:34 +00:00
Jonathon Anderson
91a69e8756 Rename debian.interfaces to ifupdown
When I first split the debian interfaces support from wwinit, I was unable to
figure out what it was called. I used the inelegant name "debian.interfaces" to
identify it; but I have since learned that it is called "ifupdown." I have
since learned that there is even a variant implementation, ifupdown-ng, that is
used by Alpine Linux.

This PR renames the overlay to ifupdown, but retains a copy of it at
debian.interfaces for backwards compatibility.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-09-15 09:50:59 -06:00
Jonathon Anderson
59f187bf5e Convert disk booleans from wwbool to *bool
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-09-05 14:16:03 +02:00
Christian Goll
cc946e0b99 removed wwBool.Parse and use Set 2025-09-05 14:16:03 +02:00
Christian Goll
026bae7a40 fixed upgrade for wwBool in disks 2025-09-05 14:16:03 +02:00
Christian Goll
2c51ca7fff added warewuld configure option
Co-authored-by: Jonathon Anderson <janderson@ciq.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-31 21:47:08 -06:00
Jonathon Anderson
4b44de6688 Fix wwctl upgrade nodes to handle kernel argument lists
`wwctl upgrade nodes` could convert legacy kernel argument formats to
the new list format, but then wasn't properly parsing the new list
format for repeat runs.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-31 19:01:47 -06:00
Christian Goll
eb9a20fa01 fix SUSE specific udev regression
Signed-off-by: Christian Goll <cgoll@suse.com>
2025-04-02 20:39:41 -06:00
Jonathon Anderson
dd2d256179 wwctl upgrade nodes --replace-overlays avoids applying overlays multiple times
- Closes: #1823

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-03-28 03:49:22 -06:00
Jonathon Anderson
06f2c0dc5a Properly configure a default IPMI template during wwctl upgrade nodes --add-defaults
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-03-19 02:20:48 -06:00
Jonathon Anderson
c8c9442178 Change upgraded default kernel args to match distributed nodes.conf
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-27 02:03:26 -07:00
Jonathon Anderson
9cedd835aa Port NFS before applying defaults
- Closes: #1758

Fixes an issue where `wwctl upgrade nodes` applied default NFS mounts and
ported in NFS entries from warewulf.conf.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-23 16:33:14 +01: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
fb9f269fc5 Update ipxe and grub configuration for clarity #1156
Also:

- Defined a menu for iPXE
- Support a IPXEMenuEntry tag to select the boot method
- Merge iPXE dracut support into default.ipxe (use IPXEMenuEntry=dracut)

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-17 02:31:05 -07:00
Jonathon Anderson
f2273fcd4a Removed check for "discoverable" profiles during wwctl upgrade nodes
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-14 20:45:39 -07:00
Jonathon Anderson
b05fa4157a Added fstab mounts for /home and /opt to initial default profile
- Closes: #1744

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-14 20:30:46 -07:00
Jonathon Anderson
a0179f1432 Resolve issues identifies by staticcheck
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-06 22:11:17 -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
032db29f87 Don't populate NetDevs[].Type or NetDevs[].Netmask during upgrade
- Closes: #1661

NetDev defaults don't behave quite the same as standard fields, because they
need to be set per-device. Meanwhile, trying to set a value may erroneously
override values that are on the default profile.

Switch this to a warning rather than attempting to take explicit action.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-03 11:00:12 +01: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
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
2e057d3a81 Remove a vestigial printf from wwctl upgrade
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-19 07:24:45 -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
22657fed36 Fix a null-pointer bug in wwctl upgrade config
Also removing some vestigial development-debug output.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-19 00:35:34 -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
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
83af6021c0 Recast Profiles as a Profile field and support recursion
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-25 09:10:05 -07:00
Jonathon Anderson
deaf9c99d7 Remove DEBUG logging in test suite
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-25 09:10:02 -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
a844379bc5 Merge --kerneloverride into --kernelversion
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:28 +01:00
Jonathon Anderson
8f21d54243 Refactor kernel support
- Remove kernel imports and kmods images
- Repurpose KernelOverride as container path
- Support Kernel.Version as version prefix for kernel selection
- Compare initramfs by version

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-09 10:02:22 +01:00
Jonathon Anderson
5834b82f93 Format errors in logs as strings
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-23 22:47:48 -07:00
Jonathon Anderson
e80c639b11 Convert config to *bool
Supports leaving booleans unspecified in YAML.

Boolean methods allow the templates to continue using previous names for
boolean values.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:48 -07:00
Jonathon Anderson
b37d49d6de Support upgrading warewulf.conf
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:45 -07:00
Jonathon Anderson
393629321c Optionally replace wwinit and generic overlays during upgrade
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:41 -07:00
Jonathon Anderson
263e3959c2 Fix handling of upgrading booleans
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:40 -07:00
Jonathon Anderson
981d11a012 Initial wwctl upgrade command
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:38 -07:00
Jonathon Anderson
336577c221 Fix linter errors
Capture and generate warnings for boolean conversion errors.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:36 -07:00
Jonathon Anderson
835506f5e8 Support inserting defaults during config upgrade
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:33 -07:00
Jonathon Anderson
ff40c0fed2 Node upgrade tests
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:04 -07:00
Jonathon Anderson
76acd8ff80 Rename RootConf to WarewulfYaml
Matches the new name of NodesYaml

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:09:01 -07:00
Jonathon Anderson
1acbfc1ffa First commit of backwards-compatible config datastructures
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-11-11 00:08:57 -07:00