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>
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>
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>
* 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>
`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>
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>
- 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>
- 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>
- 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>
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>