Commit Graph

2035 Commits

Author SHA1 Message Date
Jonathon Anderson
9058682b18 Add tests for disk data and ignition json
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-22 14:28:02 -06:00
Christian Goll
d060c3d447 Add ignition documentation
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
2892781078 Update tested golang version
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
d96c55022d Use systemd mount units for mounting ignition
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
cfbb38d570 Use ignition as a systemd service
simple init.d ignition fails as systemd is needed to set up drivers,
etc.

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
a7df560a30 Add json output for ignition
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-21 16:19:13 -06:00
Christian Goll
45539a0d1f Recursive handling for command line flags
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>
2023-08-21 16:19:13 -06:00
Christian Goll
c55c5a2ac4 Add recursive setter functions
when transforming a NodeInfo struct to a NodeConf (set the NodeConf from
the NodeInfo) nested structures were seperately handled. This means a
there were seperate handles for e.g *Netdevs and *IpmiConfig. The new
getter traverses through the datastucture and sets the right value for a
Entry struct, but calls itself again if a Pointer is detected.

This adds the posiblity to add new nested structures to NodeConf and
NodeInfo without the need of seperately handling them in the transformer
functions.

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
fdd233a25f Add recursive getter functions
When transforming a NodeConf struct to a NodeInfo (get the NodeInfo from
the Nodconf) nested structures were seperately handled. This means there
were seperate handles for e.g *Netdevs and *IpmiConfig. The new getter
traverses through the datastucture and sets the right value for an Entry
struct, but calls itself again if a Pointer is detected.

This adds the posiblity to add new nested structures to NodeConf and
NodeInfo without the need of seperate handling them in the transformer
functions.

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
f2bc70ad00 Add structures for devices and filesystems
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
4d50f053d7 Minor test fixes
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
d3650244f9 Epehermal container mounts on same fs as chroot
Previously ephemeral container mounts were performed in /tmp. Now these
mounts are overlayed on the same fs as is used for chroots.

Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-17 11:17:17 +02:00
Jonathon Anderson
cc2ae4b5fb Merge pull request #893 from mslacken/fixCocer
remove and ignore *.coverprofile
2023-08-15 21:01:27 -06:00
Christian Goll
ede1a9149e remove and ignore *.coverprofile
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-15 17:16:08 +02:00
Christian Goll
baa8254dd5 Merge pull request #871 from mslacken/RealyReboot
reboot also without systemd
2023-08-15 12:49:15 +02:00
Christian Goll
0f48516eb7 Merge pull request #890 from anderbubble/makefile-refactor
Makefile refactor
2023-08-15 12:48:27 +02:00
Christian Goll
244cecf693 Merge pull request #891 from mslacken/NodeSpecificFiles
added example for host specific files
2023-08-15 12:48:10 +02:00
Christian Goll
320c92e55e added example for host specific files
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-14 11:38:16 +02:00
Jonathon Anderson
9a453c1702 Capture proto dependency installs as targets
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-11 16:15:33 -06:00
Jonathon Anderson
d4c0e11a92 Merge pull request #854 from MatthewHink/mhink-build
Build fixes for API
2023-08-10 17:09:31 -06:00
Jonathon Anderson
526c96fb5e Update changelog to reflect Makefile changes
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:45:10 -06:00
Jonathon Anderson
b6c774c4b5 Use no config file when generating completions
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
b3b7591796 Audit Makefile clean target and gitignore
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
9ea3381b9d Remove extraneous backup file
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
d2b63ecb75 Simplier dist generation prep
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
0561c3009a Improve specification of command builds
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
5ff899293e Manage examples, ipxe, and overlays with install
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
0b9702a7d3 Separate out bash completions in Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
daab6075d7 Remove extraneous rm from clean Makefile target
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
1c3b566d43 Test targets depend on config
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
081ead8c9b Use zero-led octals for all install permissions
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
bf3995d6f5 Clean up test targets in Makefile
Most notably, replaces the test-it target with a more simply named test
target.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
ec15f0fe36 Generate defaults.conf explicitly in Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
7e31e45a0f Ignore extracted dists
When testing manual mock builds, built dists are extracted in the
current directory. This commit ignores those extracted dists so they are
not erroneously committed to the repository.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
1fdd3742c3 Improve the generation of man pages
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
f375ff32cb Remove unused debian targets from Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
88001ecfb0 Remove extraneous whitespace
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
3ef88f8fb0 Collapse files target into install
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
c1d56885ac Refactor Makefile config / Defaults.mk
Makefile has included a Defaults.mk file to store variable configuration
from one run for implicit inclusion in future runs, but the creation of
this file has been automatic and opaque, and the state of it managed by
a series of PHONY targets (e.g., config, genconfig, rm_config). This
commit refactors config to name its files explicitly (so they can be
more properly monitored by make) and makes the generation of Defaults.mk
explicit so that its behavior is more obvious.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
64fd43bb86 Apply PHONY and remove extraneous comments
Several of the targets in Makefile don't create a file of their name,
and PHONY identifies these targets to make. Alongside, several comments
in Makefile don't provide additional details beyond what is
self-documented by the command or target name itself.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 10:50:29 -06:00
Jonathon Anderson
315b78bcce Remove echo and hidden commands from Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 10:49:09 -06:00
Jonathon Anderson
a8a68e47ad Change Warewulf version to 4.5.x
Future releases from the development branch will be 4.5.x. Additional
4.4.x versions would be tagged from the 4.4.x branch.
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 10:46:52 -06:00
Jonathon Anderson
94e80b17d7 Split Makefile variables into a separate file
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 10:46:13 -06:00
Christian Goll
741add0a00 Merge pull request #889 from anderbubble/config-noreplace-nodes-conf
Restore %config(noreplace) to nodes.conf
2023-08-10 09:37:17 +02:00
Jonathon Anderson
97248797f5 Restore %config(noreplace) to nodes.conf
The previous PR #888 erroneously removed the %config(noreplace) macro from the
nodes.conf file. This PR restores it.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-09 11:50:10 -06:00
Matthew Hink
2094533894 Build fixes for API
- Updated the linter from 1.50 to 1.53.2 because the previous version
  was falling over (likely OOM).

- Updated protoc build command for newer version of protobuf.

The make command below should work now:

```shell
make clean setup proto all build wwapid wwapic wwapird ; echo $?
```

Signed-off-by: MatthewHink <matthew_hink@ciq.com>
2023-08-09 11:42:37 -06:00
Christian Goll
5af850e198 Merge pull request #887 from hpcng/want-to-container
Fix a typo in container delete confirmation prompt
2023-08-09 09:10:02 +02:00
Christian Goll
0cbf710027 Merge pull request #888 from hpcng/rpm-spec-duplicates
Fix duplicate entries in rpm %files
2023-08-09 09:08:47 +02:00
Christian Goll
56b02923b1 Merge pull request #839 from anderbubble/syncuids-refactor
Refactor syncuids and fix GID chown
2023-08-09 09:07:41 +02:00
Jonathon Anderson
abd3e21aa0 Fix a typo in container delete confirmation prompt
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-08 19:31:02 -06:00