Commit Graph

93 Commits

Author SHA1 Message Date
Christian Goll
1fca0057d3 updated WW_INTERNAL to 45 for 4.5.x release
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>
2024-02-16 20:12:51 -07:00
Christian Goll
5e94766895 do not export version and rc
create also a new warewulf.conf so that the compiled
in paths are in sync with the configuration

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-16 17:38:34 -07:00
Jonathon Anderson
a1832ad8c1 Complete transfer of Warewulf from HPCng
Warewulf is now being maintained in its own GitHub organization at
github.com/warewulf

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-01-26 21:35:04 -07:00
Christian Goll
725176cfed cleanup code after review
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
4379c4c18d use grub/shim from host system
Also the boot method is now configured globaly as this is
the only way to make sure that unkonwn nodes get the right
stuff

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
724441dc79 added test for shim and efi send
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
0c9bf78cd0 using ProvisionSend instean of GrubSend
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
60dc8f6251 enable grub boot for all nodes
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
03ef7447e9 copy shim/grub on default profile container change
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
2fe98e5f55 default profile needs to have a container
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
a36cb23319 added shim/grub find to provision process
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Jonathon Anderson
2b49bcad27 Expand test descriptions and simplify some tests
As part of reviewing this PR, I expanded the test definitions to make it
easier to discern the intent of each test at a glance. In so doing I
understood most tests behaving as normal, but I did make a few small
changes:

- Some tests no longer produce any errors, so remove this variable from
  the test definitions.
- Replace comma-separated overlay definitions with explicit slices.
  Splitting comma-separated strings led to erroneous behavior where a
  null overlay list was processed as a single null overlay rather than
  an empty slice.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-25 22:35:49 -06:00
Christian Goll
767be4fd8c refactored util_test.go to test on real files
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-10-25 22:35:49 -06:00
Christian Goll
242276bba9 fixed tests and added explcit error handling
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-10-25 22:35:49 -06:00
Christian Goll
e90616cafb calling the overlay build functions direclty
The warewulfd process called `wwctl build -O [system|runtime] node`
if autobuild was set. This created [system|runtime].img which isn't
supported with the build model. Calling now BuildOverlay directly

Signed-off-by: Christian Goll <cgoll@suse.com>
2023-10-25 22:35:45 -06:00
Jonathon Anderson
42842aeee1 Format entire source code using make fmt
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-23 17:56:20 -06:00
Jonathon Anderson
9cf47da963 Fix warewulfd for new contextual overlay names
The recent PR #883 replaced the standard overlay naming convention with
static names for each of the runtime and wwinit/system contexts; but the
method by which it left the "legacy" naming convention in place led to a
bug where warewulfd was still attempting to serve overlays with the
previous naming convention, though this name wasn't being built.

This PR refactors contextual overlay image naming to be, I think, a more
typical golang pattern, and updates affected code to match.

This PR also included tests for all functions modified by this change.

Fixes #896

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-09-02 11:18:38 -06:00
griznog
13c426de1c Add an argument to the runtime/system overlay related functions to carry the context to getOverlayFile() for building the img name. 2023-07-27 07:27:20 -05:00
jason yang
911cb4a3b9 squash commits
Signed-off-by: jason yang <jasonyangshadow@gmail.com>
2023-05-15 10:34:36 +00:00
Jonathon Anderson
70292276e2 Rename BaseConf.New to BaseConf.Get
Since BaseConf.New could return a cached BaseConf, rather than always
constructing a new struct, I've renamed it to Get to more accurately
reflect its use. A new New() method is called by Get and always
initializes a new struct.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-04-19 14:02:43 -06:00
Jonathon Anderson
c461e65a98 Rename pkg/warewulfconf to pkg/config
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-04-19 14:02:43 -06:00
Christian Goll
3367b67b9f added a test for wwctl node add
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-07 09:05:29 +01:00
Christian Goll
ce43dfa0b7 removed getters as configs must exportable
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-06 10:20:00 +01:00
Christian Goll
377702a179 make the configuration to be based in warewulf.conf
defaults will be se by the Makefile

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-03 16:02:41 +01:00
Christian Goll
78978ad233 added warewulfconf as command line parameter
the environment variable WAREWULFCONF is also recognized

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-03 11:18:49 +01:00
mslacken
ab0ee87629 updated linter and fixed deprecated stuff 2022-10-14 17:40:16 +02:00
Gregory M. Kurtzer
4d44d3a299 Merge pull request #438 from kcdodd/fix/srvdisco
Fix server thread safety of discoverable node and overlay build
2022-06-09 22:18:23 -07:00
Jean-Baptiste Denis
78144ba760 Correct typo in log messages 2022-06-07 16:51:03 +02:00
Carter Dodd
3242d2998e fixups 2022-06-05 17:37:23 -05:00
Carter Dodd
30ba916703 Move overlay build logic to util, add limit to spawned processes 2022-06-05 17:28:14 -05:00
Carter Dodd
f14f339576 fixups 2022-06-04 11:42:16 -05:00
Carter Dodd
fc8d3863d8 use wwctl to re-build provision overlays, update to pass overlaynames 2022-06-04 11:14:48 -05:00
Carter Dodd
7caabc439d separate safe/unsafe db operations 2022-06-02 22:22:19 -05:00
Carter Dodd
04fb854aa7 fixup import 2022-06-02 20:20:03 -05:00
Carter Dodd
95ca053960 Lock server node db when updating discoverable node 2022-06-02 20:06:34 -05:00
Gregory Kurtzer
bf9ca54b8e Don't read in binary data blobs to memory before sending to HTTP writer 2022-05-25 23:11:26 -07:00
Carter Dodd
9c5759c857 Remove new dhcp config options
Discussion indicated a need for more general handling of network config.
Avoids adding new options that may become deprecated in the near future.
2022-05-19 19:02:58 -05:00
Carter Dodd
7ecaae1361 Fix only serve/check Secure for runtime 2022-05-16 12:38:53 -05:00
Carter Dodd
118f20b01a Check error on init logging 2022-05-14 00:22:19 -05:00
Carter Dodd
a27be52e3f Fix unhandled errors 2022-05-13 22:33:29 -05:00
Carter Dodd
379faad51d Refactor of server, logging, building of images, template updates
* Combine provision response handling, add hwaddr and interface to dhcp
* Simplify stage cases, add backward compatible uri parse
* Move control of image compression to client
* Fix kernel search path for ubuntu, buffer template generation
* Implement cpio and gz as functions, add log named functions
* Generalize fs image creation routine
* Combine daemonLogf to generalized wwlog
* Fix template newline insertion, update dhcp and hosts tmpl
* Update IPXE template to handle non-compressed files
* Update DHCP template to set network interfaces and server IP assignment
* Update DHCP/hosts templates to choose a host-name self-consistently
2022-05-13 16:52:59 -05:00
Gregory Kurtzer
dd1cf6f4a5 Don't force LC on node set
This makes it so we can never UNDEF/DELETE an entry as that requires
upper case. So we are doing the lower case now where it matters.
2022-05-03 21:53:47 -07:00
jcsiadal
bfde70cf8a Error free lint
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-04 17:01:11 +00:00
Christian Goll
d4e42b7b83 allow download of named overlay 2022-03-11 14:52:01 +01:00
Christian Goll
afac77dbbe allow multiple generic and wwinit overlays 2022-03-11 11:50:38 +01:00
Gregory Kurtzer
1203186194 Support kernel overrides from the host or other containers 2022-02-17 07:37:04 +00:00
Gregory Kurtzer
104bc7527d Restored deleted kernel components for overrides 2022-02-17 06:21:40 +00:00
Gregory Kurtzer
5a0c13225e Utilize containerized kernel and remove kernel Support 2022-02-15 06:49:24 +00:00
Gregory Kurtzer
b80d41975a Update status before sending data to iPXE/node 2022-02-09 20:11:25 +00:00
Gregory Kurtzer
9e943101ec Always use lowercase for hw addresses 2022-01-26 04:02:30 +00:00