Jonathon Anderson
e478adc45d
Add InterfaceTransformer{} to a Merge call that omitted it
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-01-18 07:33:11 -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
eff1edd038
Fixing tests in review of #1568
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-01-17 01:27:15 -07:00
Christian Goll
847d11611b
creating exports from resource
...
Signed-off-by: Christian Goll <cgoll@suse.com >
2025-01-16 23:00:37 -07:00
Christian Goll
07c77a63d5
use list of resources in profiles/nodes
...
access the resource not at node or profile level but
in the templates as global variable
Signed-off-by: Christian Goll <cgoll@suse.com >
2025-01-16 23:00:37 -07:00
Christian Goll
5ff27061a3
added remote resources
...
Signed-off-by: Christian Goll <cgoll@suse.com >
2025-01-16 23:00:37 -07:00
Christian Goll
455d9b65e4
Fix panic ObjectIsEmpty for bool
...
Signed-off-by: Christian Goll <cgoll@suse.com >
2025-01-15 13:34:45 +01:00
Jonathon Anderson
7e742b0d8a
Fix DelProfile to operate on profiles, not nodes.
...
- Fixes : #1622
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-27 05:58:46 -07:00
Jonathon Anderson
749f1eba1d
Fix a panic introduced by #1598
...
- Fixes : #1618
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 13:46:04 -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
1a3d037703
Refactor GetNode merging with new MergeNode method
...
- Adds many tests for node+profile merging
- Ensures that tracked fields match mergo results
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 09:07:28 -07:00
Jonathon Anderson
c244adc7f6
Performance improvements for overlay build
...
Rendering overlay templates requires fetching and populating / merging all
other nodes, because overlay templates have access to all cluster node info.
This was previously being done for each template render, but is not being done
once for each render operation and re-used for each template render.
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 08:48:14 -07:00
Jonathon Anderson
a59403ab3b
Parallel overlay builds
...
- Closes #1018
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 08:48:14 -07:00
Jonathon Anderson
53e5805fbe
Remove os.Umask from overlay.BuildOverlayIndir
...
Adds tests to ensure that the overlay image contains the correct permissions.
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 08:48:14 -07:00
Jonathon Anderson
1affdc1883
Remove Chdir from util.BuildFsImage
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 08:48:14 -07:00
Jonathon Anderson
e3680438a6
Remove Chdir from overlay.BuildOverlayIndir
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 08:48:14 -07:00
Jonathon Anderson
9dd1ca0d53
Removed Chdir from util.FindFilterFiles
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 08:48:14 -07:00
Jonathon Anderson
b0164c36b9
Remove Chdir from util.FindFiles
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 08:48:14 -07:00
Jonathon Anderson
74616f578d
Improve syncuser conflict help text
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2025-01-08 15:50:45 +01:00
Christian Goll
f1e587eb23
Merge pull request #1613 from anderbubble/remove-setdefault
...
Remove `wwctl overlay <build|import> --setdefault`
2025-01-08 15:45:10 +01:00
Jonathon Anderson
170f055c20
Log cpio errors more prominently
...
Previously, cpio output would only be shown as a debug message. Now it is shown
as an error message if cpio returns an error.
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-25 00:34:38 -07:00
Jonathon Anderson
d0f4eaa9bb
Remove wwctl overlay <build|import> --setdefault
...
- Closes : #1335
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-24 23:14:12 -07:00
Jonathon Anderson
0b00233ab7
Move tstruct.Overlay from wwctl to overlay.InitStruct
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-20 11:12:47 +01:00
Jonathon Anderson
c03dc9436b
Add an Overlay type with helper methods
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-20 11:12:47 +01:00
Jonathon Anderson
7d4b7ab432
Remove OverlayDoesNotExistError
...
- No receiver of the error is checking its type
- No receiver of the error is checking its `Name` attribute
- Any receiver of the error knows the name already
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-20 11:12:47 +01:00
Jonathon Anderson
ac49ecef70
Rename and refactor overlay constructor functions
...
- Reduces redundancy
- Adds clarity
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-20 11:12:47 +01: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
Christian Goll
d5fc7e9320
introduce site overlays
...
site overlays are place in sysconfdir/overlays and take
precedence over distribution overlays with the same name.
Every `wwctl overlay` command changing overlays will create
an site overlay. distribution overlays can't be deleted or
modified with wwctl.
Signed-off-by: Christian Goll <cgoll@suse.com >
2024-12-20 11:12:41 +01:00
Christian Goll
e8f7c01283
Merge pull request #1595 from anderbubble/removeInit
...
Configure nodes.conf dynamically from config
2024-12-20 11:00:27 +01:00
Jonathon Anderson
fc82244749
Refactor softlink functions to remove repetition and add flexibility
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-17 18:48:00 -07:00
Christian Goll
9ff5c60505
create soft link with template
...
Add the the function softlink to the template rendering, so that
{{ softlink: "/bin/bash" }} for the file `/bin/run.ww` will create
a soft link to `/bin/bash`
It's also possible to "import" soft links from the host, e.g. the
template
{{ ImportLink "/etc/localtime" }}
set the timezone from the host
Signed-off-by: Christian Goll <cgoll@suse.com >
2024-12-17 18:48:00 -07:00
Jonathon Anderson
a80ba8ee01
Configure nodes.conf path dynamically from config
...
Removes the use of init() to initialize the variable.
- Closes : #1596
- See also: #1569
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-17 11:04:43 -07:00
Jonathon Anderson
c18bcfe3bd
Support importing containers from directories containing a socket
...
- Fixes #892
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-09 11:19:48 -07:00
Jonathon Anderson
facba28e0f
Rename "preferred" kernel to "default" kernel
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-09 10:02:29 +01:00
Jonathon Anderson
098c288ce2
Provide detected kernel version to overlay templates
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-12-09 10:02:28 +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
Christian Goll
d584c14403
Merge pull request #1564 from anderbubble/issues/1447
...
Use a sentinel file to determine container readonly state
2024-12-02 09:03:02 +01:00
Jonathon Anderson
07f6402520
Use a sentinel file to determine container readonly state. #1447
...
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-11-29 10:37:52 -07:00
Jonathon Anderson
e098455f7c
Fix display of profiles in node list
...
- Closes #1496
Signed-off-by: Jonathon Anderson <janderson@ciq.com >
2024-11-25 11:32:03 +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
Christian Goll
8f196a9dce
added test for sending grub.cfg.ww
...
Signed-off-by: Christian Goll <cgoll@suse.com >
2024-11-14 19:25:48 -07:00
Christian Goll
68f62ed0a1
fix problem that tags don't show up in overlay
...
Signed-off-by: Christian Goll <cgoll@suse.com >
2024-11-14 19:25:22 -07:00
Christian Goll
c0d2e3714c
add tag to tags not nettag
...
Signed-off-by: Christian Goll <cgoll@suse.com >
2024-11-14 17:17:43 -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