Commit Graph

710 Commits

Author SHA1 Message Date
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
457c7c16b1 wwctl commands without NodeInfo
mostly remove Get and calls for the id

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-10-17 13:35:42 -04:00
xu yang
f973733130 wwctl node set requires mandatory pattern input
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-30 12:50:20 +00:00
Christian Goll
62f3cfb868 Merge pull request #1440 from JasonYangShadow/issue/1439
wwctl should return non-zero exit code on wwctl power sub-commands
2024-09-30 08:50:05 +02:00
xu yang
65f67b79ba wwctl should return non-zero exit code on wwctl power sub-commands
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-30 06:41:53 +00: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
Jonathon Anderson
e4651bbc7c Update Rocky 9 quickstart
- Closes #1179

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-27 10:51:25 -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
Jonathon Anderson
8d4cb37b24 Move UTC selection to testsuite environment variable
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-26 18:23:47 -06: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
Brandon Biggs
24ea5580e2 Fix a typo in wwctl power soft help text 2024-09-26 11:42:54 -06:00
Jonathon Anderson
cac6ae1cd0 Fix wwlog.Output format strings during overlay show
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-26 10:48:40 -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
Jonathon Anderson
e99e8c3dbb Update use of wwlog.Info to specify a format string
Since wwlog.Info() expect a format string, accidental inclusion of a
format string in the payload causes an error.

See also #1382, #1363

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-25 13:49:11 -06:00
xu yang
aa8282ad10 Fix excessive line spacing issue when listing nodes
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-25 13:49:08 -06:00
Christian Goll
d24a92965f Merge pull request #1406 from anderbubble/1389-rundir-help-text
Additional help test when container.RunDir already exists
2024-09-25 11:10:22 +02: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
b9a35ac664 Merge pull request #1358 from JasonYangShadow/fix/1344
Add --syncuser flag to wwctl shell
2024-09-23 11:32:30 -06:00
Jonathon Anderson
512f244067 Merge pull request #1404 from JasonYangShadow/issue/1378
Add flag --build to wwctl container copy, default false
2024-09-20 17:43:57 -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
aa35ce93e5 Return non-zero exit code on container copy failure
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-19 23:58:32 +00:00
Jonathon Anderson
836b791d74 Additional help test when container.RunDir already exists
- Closes #1389

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-19 11:40:10 -06:00
Jonathon Anderson
96119484d8 Move syncuser pass from shell to exec
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-17 21:26:32 -06:00
xu yang
0b3eace403 Add syncuser to wwctl container shell and switch to mtime
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-17 21:26:30 -06:00
Tobias Ribizel
c6b6caeb0b fix lint warnings
Signed-off-by: Tobias Ribizel <mail@ribizel.de>
2024-09-16 12:55:27 +02:00
Tobias Ribizel
7692babd76 Return error code if overlay build fails
Signed-off-by: Tobias Ribizel <mail@ribizel.de>
2024-09-15 01:43:53 +02:00
Jonathon Anderson
5860334a89 Improve error handling during container file copy removal
Based on feedback at #1365

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-09 11:09:10 +02:00
Jonathon Anderson
9e91b1c19a Rename :cow to :copy
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-09 11:09:10 +02:00
Jonathon Anderson
3a36016707 Refactor of new copy-on-write feature
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-09 11:09:09 +02:00
Jonathon Anderson
173546348f Edited documentation for new copy-on-write feature
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-09 11:09:09 +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
f39972f917 Prevent overlays from being improperly used as format strings
`wwctl overlay show --render` shows the rendered overlay with
`wwlog.Info`, but that caused it to be processed as a format string.
This passes an explicit format string first, and then includes the
rendered overlay as a variable to the formatter.

- Fixes #1363

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-06 15:01:49 +02: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
bfa6ad6be8 add test case
Signed-off-by: xu yang <xyang@ciq.com>
2024-09-04 17:10:50 -06:00
Jonathon Anderson
9e0f255fe3 Use wwctl container import --password by default
Retains support for --passwd as a hidden flag targeting the same
variable.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-04 16:52:16 -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
73c70da4ef Refactor url build in wwclient with url.URL
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-04 14:06:56 +02:00
Jonathon Anderson
f02af9f242 Container list shows size if any size option specified
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-08-02 16:36:15 -06: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
c9c38542f4 added completion to overlay chmod/chown/delete/edit
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-08-02 13:55:56 -06:00
Jonathon Anderson
6028a6eb58 Minor adjustments to exitEval and msgStr
For grammar clarity, and consistency.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-08-02 13:29:59 -06:00
Christian Goll
9d2853ad64 Show pending container build status during container exec, shell
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-08-02 11:43:05 -06:00
Jonathon Anderson
212b57f095 Merge pull request #1309 from griznog/sanitize-wwclient-url-data
sanitize wwclient url data
2024-08-02 10:50:26 -06:00
griznog
103852df78 Sanitize/escape asset tag strings from dmidecode. 2024-08-02 09:13:47 -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
xu yang
cec903aeeb resovle the comments
Signed-off-by: xu yang <xyang@ciq.com>
2024-07-25 06:42:16 +00:00
xu yang
62d9b5f71d fix the failure when updating overlay files existing on different partitions
Signed-off-by: xu yang <xyang@ciq.com>
2024-07-25 02:29:29 +00:00