`wwctl node edit` appears to not be working properly since MergeNode. This
refactor, partly towards #918, resolves the issues with `node edit` and updates
`profile edit` to match.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
- Updated `wwctl upgrade` to handle updates
- Maintained `.Container` and `.ContainerName` in tstruct
- Added `ContainerName()` methods to node and profile objects
- Added `--container`, `-C` aliases to wwctl commands (`<node|profile> <add|set>`)
- Added `wwctl container` alias
- Added support for `container_exit.sh` if `image_exit.sh` is not found
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
- 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>
- 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>
- Closes#1497
- Closes#1498
This library is simpler and doesn't produce extraneous whitespace around
the output.
A local helper function restores "--" for empty output.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
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>
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>
Internal version update is necessary as new structures were added,
most obviously the disk, partitions and file system structures.
Old configurations will work as expected.
Signed-off-by: Christian Goll <cgoll@suse.com>
Every struct in a NodeConf with `lopt:"foo" set is now added as a
command-line flag with the RecursiveCreateFlags call. For maps a struct
with the key UNDEF is added so that it can be parsed out.
As the flags for the command-line need variables which hold the values,
for every map an element map[UNDEF] is added. When now calling the
internal add, these map element can be filtered out and replace by the
given name. (e.g., --netname)
* rewrote node/profile add for recursive functions
* rewrote node/profile set for recursive functions
* rewrote node/profile list for recursive functions
Signed-off-by: Christian Goll <cgoll@suse.com>
Also refactor New and Get to return pointers to match BaseConf methods.
This makes calling the methods immediately on the return values of the
constructors easier.
Also move config.ConfigFile to buildconfig.go.in. ConfigFile is still
used by wwctl as a default config file to reference; but it is removed
from other locations now.
Removed Persist, as nothing called it.
Signed-off-by: Jonathon Anderson <janderson@ciq.co>