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
Jonathon Anderson
a2c7caa4ba
Rebuild overlays for discovered nodes
...
- Fixes : #1468
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-07-09 14:29:38 -06:00
Tobias Ribizel
470b7d7519
add newline to docstring
...
Signed-off-by: Tobias Ribizel <mail@ribizel.de >
2025-07-07 15:50:43 +02:00
Tobias Ribizel
c2a51c2a7e
format and changelog
...
Signed-off-by: Tobias Ribizel <mail@ribizel.de >
2025-07-07 15:44:11 +02:00
Tobias Ribizel
301082cdd7
add docstring for node patterns
...
Signed-off-by: Tobias Ribizel <mail@ribizel.de >
2025-07-06 16:36:45 +02:00
Jonathon Anderson
2ba6e28215
Remove wwctl node import --csv
...
- Closes #1862
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-07-02 21:25:54 -06:00
Jonathon Anderson
48bace55f6
Preserve file permissions during wwctl overlay edit
...
- Fixes : #1886
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-07-02 08:06:13 -06:00
Jonathon Anderson
3db131eadf
Fix width of wwctl image shell --help
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-07-02 13:54:56 +02:00
Christian Goll
2e860c3462
changed SetId() to setId()
2025-07-02 13:51:07 +02:00
Jonathon Anderson
db3a3fee05
Additional overlays to support provision-to-disk without ignition
...
- sfdisk - partitions the disk
- mkfs - formats partitions
- mkswap - formats partitions for swap
- systemd.mount - explicit creation of systemd mount units
- systemd.swap - explicit creation of systemd swap units
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-06-30 23:24:20 -06: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
b8641b8569
more variables for the grub templates
...
Signed-off-by: Christian Goll <cgoll@suse.com >
2025-06-17 01:34:23 -06:00
Jonathon Anderson
7d437e9e58
Merge pull request #1925 from MatthewHink/mhink-ovl
...
Add uid, gid, and permissions to OverlayFile struct
2025-06-16 17:13:20 -06:00
Jonathon Anderson
f61dfdde87
Use jsonassert in test
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-06-16 17:09:34 -06:00
MatthewHink
b6c33d9567
Add uid, gid, and permissions to OverlayFile struct
...
There is an existing test for this. uid, gid, and permissions seem
consistent across test boxes.
2025-06-16 17:09:24 -06:00
Jonathon Anderson
680ecfb3fd
Minor updates to wwclient log messages
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-06-16 11:02:40 +02:00
MatthewHink
0a1d12e6d4
Fail API add node if node exists
2025-06-13 12:22:03 -07:00
Christian Goll
e72368cd26
fix wwctl profile set for disk/fs/part
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-05-27 13:56:04 -06:00
Jonathon Anderson
b5d72fb393
Address unhandled deadcode issues
...
- Fix `make deadcode` to properly fail GitHub checks
- Resolve "dead" code by refactoring other code to use it
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-05-10 11:26:11 -06:00
Matt Hink
be73ac056a
Initial cut for removing the old API.
...
Remove API reverse proxy server and google dependencies.
Remove API config.
Remove API client.
Remove API GRPC server.
Remove unused ImageCopy function. image.Duplicate is used.
Update Makefile to avoid protobuf builds.
Signed-off-by: Matt Hink <mhink@ciq.com >
2025-05-10 10:58:03 -06:00
Jonathon Anderson
4005afac4c
Add a new OpenAPI v3 REST API to warewulfd at /api
...
Co-authored-by: jason yang <jasonyangshadow@gmail.com >
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-04-03 07:12:03 -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
51786b5e4a
Fix a panic during wwctl node list --ipmi for nodes with no ipmi configuration. #1847
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-04-01 16:48:43 -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
1883f2e932
Added a test for wwctl node import
...
To support this, also added `wwctl node import --yes`.
Also corrected the spelling of `--cvs` to `--csv`.
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-03-25 20:00:48 -06:00
Rafael Lopez
ca1830d8e1
Rename value in loop
...
Rename value from 'node' to 'nodeData' so it doesn't
coincide with the package import name.
Signed-off-by: Rafael Lopez <raflopez1@gmail.com >
2025-03-25 19:21:30 -06:00
Rafael Lopez
299f1db41c
fix import from yaml where node does not pre-exist
...
Check if node exists, if not add it first before
attempting SetNode().
Fixes : #1842
Signed-off-by: Rafael Lopez <raflopez1@gmail.com >
2025-03-25 19:21:30 -06:00
Jonathon Anderson
09488db3f6
Fix processing of UNDEF and UNSET during wwctl <node|profile> set. #1837
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-03-25 18:16:14 -06:00