Commit Graph

1567 Commits

Author SHA1 Message Date
Christian Goll
983a359c00 refactor to overlay info 2025-12-09 22:52:44 -07:00
Christian Goll
d1d398d2ff add more generic documentation via wwdoc(n)
doc
2025-12-09 22:52:44 -07:00
Christian Goll
68758e3e45 use comments of variables for help 2025-12-09 22:52:44 -07:00
Christian Goll
facde98fb5 new overlay variables command 2025-12-09 22:52:44 -07:00
Christian Goll
847a4386e1 don't show vars in overlay list
vars
2025-12-09 22:52:44 -07:00
Christian Goll
5d284b1c61 show used Tags for overlays 2025-12-09 22:52:44 -07:00
Timothy Middelkoop
5bad8e45fd IPv6: Add Network6 to tstruct
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2025-11-30 02:38:33 +00:00
Timothy Middelkoop
3aded908ce Add overlay variable NetworkCIDR6
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2025-11-27 19:34:28 +00:00
Timothy Middelkoop
c99cfec1b0 IPv6: wwclient support
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2025-11-27 02:55:34 +00: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
463994976e Add IpCIDR6 and IPv6 DHCP range
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2025-11-17 17:53:09 +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
685fd0338e Use a native library for SELinux in wwclient
This removes the dependency on shelling out to commands in the image.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-11-05 12:33:18 +01:00
Christian Goll
81a970bbd5 Merge pull request #2051 from cclerget/delete-image-errors
Fix ImageDelete API not returning error when checking if image is used by nodes/profiles
2025-11-05 12:30:57 +01:00
Jonathon Anderson
40f0cebe64 Configure destination of grub.cfg at overlay render time
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-10-29 21:27:47 -06:00
Jonathon Anderson
be97ef15a0 Manage selinux context of tftp directory
- Fixes: #1997

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-10-29 20:11:41 -06:00
Cédric Clerget
718c79c7ca Fix ImageDelete API not returning error when checking if image is used by nodes/profiles
Signed-off-by: Cédric Clerget <cedric.clerget@gmail.com>
2025-10-27 16:41:15 -05:00
Jonathon Anderson
a4bde3b279 Fix "address already in use" after wwclient --once
- Closes: #2009

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-10-14 13:01:04 -06: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
92375f4ebb Explicit field names
Fields now use the value of a `name` tag on a struct to determine the display
name for a given field. This improves output for boolean-pointer fields, which
otherwise have a P suffix and helper methods to retain backwards-compatibility.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-09-05 14:08:24 -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
d5b94afcb9 replace bools in disk structures with wwBool 2025-09-05 14:16:03 +02:00
Christian Goll
5e40c66381 test for disk vars set to false 2025-09-05 14:15:53 +02:00
Adrian Reber
e86981fd59 fix(wwctl): Create overlay edit tempfile in tmpdir
When editing an overlay, the temporary file was created within the
overlay directory structure. This could lead to the temporary file
being included in the overlay if not cleaned up properly.

This change modifies the behavior to create the temporary file in the
system's default temporary directory, avoiding any potential issues
with the overlay itself.

Not using this change the temporary file can be seen in the overlay:

 DEBUG  : Using temporary file /usr/share/warewulf/overlays/host/ww-overlay-edit-2879742493
 DEBUG  : Checking if path exists as a file: /usr/share/warewulf/overlays/host/rootfs/etc/hosts.ww
 DEBUG  : ExecInteractive(tee, [/usr/share/warewulf/overlays/host/ww-overlay-edit-2879742493])

 # find /srv | grep ww-overlay
 /srv/warewulf/overlays/host/ww-overlay-edit-2879742493

With this patch applied:

 DEBUG  : Using temporary file /tmp/ww-overlay-edit-266752840
 DEBUG  : Checking if path exists as a file: /usr/share/warewulf/overlays/host/rootfs/etc/hosts.ww
 DEBUG  : ExecInteractive(tee, [/tmp/ww-overlay-edit-266752840])

 # find /srv | grep ww-overlay

Assisted-by: Gemini 2.5 Pro
Signed-off-by: Adrian Reber <areber@redhat.com>
2025-09-04 14:10:13 -06:00
Jonathon Anderson
32ca0a9170 Atomic overlay file application in wwclient
Update wwclient such that each file in the runtime overlay is applied
atomically, and only if modified.

- Closes: #1307
- Closes: #1975
- Closes: #1226

Also adds --once flag to allow wwclient to be run one time.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-28 07:45:35 -06:00
Jonathon Anderson
66450a7dcd Simpler names for overlay methods
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-27 22:33:18 -06:00
Jonathon Anderson
6fd858899d Fix warewulfd api behavior when deleting distribution overlay
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-27 22:25:21 -06:00
Jonathon Anderson
e609c599a1 Address feedback from Copilot
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-27 22:25:21 -06:00
Christian Goll
6f4fd60d8f refactored overlay class
overlay.GetOverlay(name) returns now an error if the overlay doesn't
exist. This is the most canonical way to act if there is no overlay.
2025-08-27 22:24:31 -06:00
Christian Goll
1e54d02f70 Revert "Atomic overlay file application in wwclient"
This reverts commit 9f11b4a2b9.
2025-08-13 09:57:31 +02:00
Jonathon Anderson
9f11b4a2b9 Atomic overlay file application in wwclient
Update wwclient such that each file in the runtime overlay is applied
atomically.

- Closes: #1307
- Closes: #1975
- Closes: #1226

Also adds --once flag to allow wwclient to be run one time.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-12 23:16:03 -06:00
Dacian Reece-Stremtan
efd63aecd4 IPv6 iPXE support
* Parse address and port with netip w/ tests
* Add Authority to provisioning templates based on remote IP family
  (name based on RFC 3986)
* Add IPv6 support to the default iPXE (tested)
* Update `grub.cfg.ww` to use Authority (untested)

Co-authored-by: Dacian Reece-Stremtan <dacianstremtan@gmail.com>
Co-authored-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
2025-08-01 14:46:36 -06:00
Jonathon Anderson
b3a6f3d905 Fix a race condition in wwctl overlay edit
Switches to using sha256 rather than mtime to detect changes to an
overlay file.

- Fixes: #1947

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-01 01:57:02 -06:00
Jonathon Anderson
ebc101b2b1 Move reexec.Init() to beginning of wwctl
- Fixes: #1879

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-08-01 01:08:20 -06: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
Jonathon Anderson
7d0b73e452 Address copilot review from #1945
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:57:01 -06:00
Jonathon Anderson
5ceeb60c24 Refactor wwapi tests for proper isolation
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:18:48 -06:00
Jonathon Anderson
e149a332e6 Bugfix: cloning a site overlay when parent dir does not exist
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:18:48 -06:00
Jonathon Anderson
749e79b7ec Clone to a site overlay when adding files in wwapi
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:18:48 -06:00
Jonathon Anderson
9884aad504 Consolidated createOverlayFile and updateOverlayFile to addOverlayFile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:18:48 -06:00
jason yang
62d1aa654d Support for creating and updating overlay file in wwapi
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
2025-07-28 18:18:48 -06:00
Jonathon Anderson
7b2c0901ed Only return overlay files that refer to a path within the overlay
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:18:48 -06:00
jason yang
e089fe0101 add overlay file deletion support
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
2025-07-28 18:18:48 -06:00
Jonathon Anderson
6b5115934b DELETE /api/overlays/{id}?force=true can delete overlays in use
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:18:48 -06:00
Jonathon Anderson
949dc9d46b Restore idempotency of PUT /api/nodes/{id}
HTTP PUT is supposed to be idempotent, so PUT for an existing node or
profile should replace the node or profile, not throw an error.

Generating an error on duplicate can now be requested using the
If-None-Match header with a `*` value.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:18:41 -06:00
Jonathon Anderson
a0752a5bd0 Simplify overlay mtime api and add tests
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-07-28 18:18:22 -06:00
jason yang
a3dbf6aeee add node overlay buildtime
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
2025-07-28 18:18:13 -06:00