Commit Graph

850 Commits

Author SHA1 Message Date
Christian Goll
cb9e6e8be0 Removed rest of direct yaml.v2 deps
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-25 14:33:57 -06:00
Jonathon Anderson
b331fd12af Remove dead code
Verified with

```
deadcode -test ./...
```

Followed-up with a lint check.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-18 15:09:01 -06:00
Jonathon Anderson
d3cd31fdc0 Restore a commented-out test
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-18 00:06:22 -04:00
Jonathon Anderson
30ac144044 Restored profile list tests and resolved exposed bugs
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 23:58:37 -04:00
Jonathon Anderson
bb5d1d17ed Revert NetDevs.Manual back to NetDevs.OnBoot
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 23:00:57 -04:00
Jonathon Anderson
df37018f79 Fix wwctl node edit
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 23:00:52 -04:00
Jonathon Anderson
d91d273ac7 Use ProfileConf rather than NodeConf for profile commands
This removes node-only attributes, like a profile list, from profile commands.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 15:39:59 -04:00
Jonathon Anderson
5fbeaa1873 Remove an extraneous tab
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 15:39:59 -04:00
Jonathon Anderson
f7f8dfcf5c Fix a regression in passing metadata to grub.cfg.ww
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 15:39:59 -04:00
Christian Goll
0c6e7cc58a fixes for split overlays
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:39:54 -04:00
Christian Goll
c08cd82e68 don't use net.IPMask
net.IPMask doesn't have any advantages, as it would
marshalled to
mask:
  - 1
  - 2
  - 3
  - 4

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:54 -04:00
Christian Goll
9fdb9ca792 updated overlays
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:54 -04:00
Christian Goll
342236b9b9 updated test for yaml/v3
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:54 -04:00
Christian Goll
9ba1aa8d63 api changes to modify unexported fields
changes can now not be done directly but must
go to SetNode or SetProfile. Although its also
now possible to access the field direclty with
GetNodePtr

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:54 -04:00
Christian Goll
bddcdfcac4 added new types for primitves
this types like WWbool are needed so that they can
have their own command line parses which allows a UNDEF
for e.g. bool or ints.

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:54 -04:00
Christian Goll
5bd4fd4712 use yaml/v3 and don't export Nodes
introduced wwbool and don't export
Nodes and NodeConfs. This requires new
explict Yaml (un)marshaling as the standard
marshaller won't touch these fields

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:54 -04:00
Christian Goll
ac6cd69ca6 fix test to run without NodeInfo
Also removed --fullall from node list and profile list

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 15:30:47 -04:00
Christian Goll
ffef31969e api changes for use without NodeInfo
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 13:35:42 -04:00
Christian Goll
28a7b9fe84 removed NodeInfo and using NodeConf instead
This is a significant change in the undelying data model!

nodeDb, err := node.New()

will result in a structure which contains the on disk
values. Only

nodeDb.FindAllNodes() or nodeDb.GetNode(id) will give
the nodes with its merged in profiles.

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 13:35:42 -04:00
xu yang
f7c4b32fc2 Fix issue that domain globs not supported during wwctl node delete.
Signed-off-by: xu yang <xyang@ciq.com>
2024-10-11 09:50:48 +00:00
xu yang
f51808bc75 fix issue that pattern matching broken on node set
Signed-off-by: xu yang <xyang@ciq.com>
2024-10-11 02:27:33 +00:00
Christian Goll
20e243a106 Merge pull request #1432 from JasonYangShadow/issue/1388
Change the permission of overlay dir to `0750` and generated overlays to `0660`
2024-09-30 08:41:56 +02:00
Jonathon Anderson
cdbabfc834 Update IgnitionJson to sort the list of file systems
- Closes #1433

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-27 18:15:15 -06:00
Jonathon Anderson
e9d3ad717c Move umasking for overlay images to wwctl
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-27 11:53:19 -06:00
xu yang
d59ace3792 Change the permission of overlay dir to and generated overlays to
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-27 11:48:44 -06:00
Christian Goll
132869f8b3 Merge pull request #1306 from anderbubble/split-test-overlays
Split overlays into discrete functionality and test
2024-09-27 14:59:37 +02:00
Christian Goll
883de9c4fc no panic if listing non existing container image
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-09-26 18:22:36 -06:00
Jonathon Anderson
053dd9953a Split overlays into discrete functionality and test
- Closes #987

To make the overlays testable in isolation, and after discussion with
the TSC, removed host/time/source from overlay files.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-26 10:48:38 -06:00
xu yang
3f120f2c4b Return non-zero exit code on node sub-commands
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-26 06:15:02 +00:00
xu yang
94e203dd2e return non-zero exit code on container sub-commands
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-25 08:50:50 +00:00
Jonathon Anderson
15aa081dd1 Move restoration of old umask to a defer
Suggested in comment on PR #941

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-21 22:42:51 -06:00
Christian Goll
a8658c226f emsure that .Paths.Tftpdir."warewulf" is 0755
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-09-21 22:41:08 -06:00
Christian Goll
9a28b2d7fb copy.DirCopy is internal and needs Init
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-09-21 22:12:57 -06:00
Jonathon Anderson
75224bc9ba Merge pull request #1400 from JasonYangShadow/issue/1332
fix autodetected kernel sorting
2024-09-20 17:45:17 -06:00
xu yang
1f492dfed5 Add flag --build to wwctl container copy, default false
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-20 17:31:17 -06:00
xu yang
31c980f731 fix autodetected kernel sorting
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-19 15:13:52 -06:00
xu yang
5492ac0107 Return an error during wwctl container import if archive filename contains a colon
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-14 22:18:01 -06:00
Jonathon Anderson
9e91b1c19a Rename :cow to :copy
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-09 11:09:10 +02:00
Christian Goll
dc263425e2 Added cow option to bind
The option cow can now be set for files which are then
mounted during exec, but copied into the image and removed
if not modified.

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-09-09 11:09:04 +02:00
Jonathon Anderson
d05414436a Additional guidance when syncuser conflicts
- Closes #1359

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-06 14:03:15 -06:00
Jonathon Anderson
4a5c1cad12 Simplified slice ordering fix and extended for runtime overlay
- Extends #1357
- Fixes #1259

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-04 19:59:59 -06:00
xu yang
cc617007cd prefer profile overlay value over node one
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-04 17:10:49 -06:00
Christian Goll
13349bbf66 adding WAREWULF_OCI vars to wwctl
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-09-04 20:52:43 +02:00
Jonathon Anderson
0b6785f722 Remove specific guidance from wwctl error messages
Guidance to run `wwctl configure dhcp` or `wwctl configure tftp` may be
misleading for sites that are managing these services directly. They are
also too specific, as simply re-running `wwctl configure -a` after
enabling them in the config should also be sufficient.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-03 19:40:59 -06:00
xu yang
6212f40e4c Refine wwctl configure error handling
- Closes #1273

Signed-off-by: xu yang <xyang@ciq.com>
2024-09-03 19:40:28 -06:00
Tobias Poschwatta
b4e1b9cb24 Fix typo in "profile with name ... already exists" message
Signed-off-by: Tobias Poschwatta <poschwatta@zib.de>
2024-08-30 11:45:43 +02:00
Christian Goll
553e401fe0 enhanced container list
Container list has now options for full, kernel and size listing. Without any
arguments only available containers are listed. Size is no more fine granular
showing also size of the image, chroot and compressed image

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-08-02 16:34:54 -06:00
Christian Goll
6f5f6f07ee removed dead boot method from defaults.conf
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-08-02 14:32:29 -06:00
Tobias Poschwatta
971d9e2118 Add option for wwclient port number
With this change, you can specify a port number for wwclient.
If

  wwclient:
    port: NUMBER

is specified in warewulf.conf, wwclient will bind to the specified local
port NUMBER. If no port is specified, wwclient will use any available
port, or port 987 if secure is true.

Port 987 is in the default port range used by the Linux NFS client
(665-1023, see linux/include/linux/sunrpc/xprtsock.h). Changing
the port can avoid failures when port 987 is already in use.

Signed-off-by: Tobias Poschwatta <poschwatta@zib.de>
2024-08-02 11:09:16 +02:00
Jonathon Anderson
9050622f68 Ensure autobuilt overlays include contextual overlay contents.
Following #1249, autobuilt overlays were being built with no contents.

This change follows the pattern in `wwctl overlay build` to include configured
overlays when none are explicitly specified.

Inspired by #1296.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-07-10 16:06:06 -04:00