Commit Graph

33 Commits

Author SHA1 Message Date
Jonathon Anderson
d33ca6ff53 Simplify warewulfd logging
- Collapse SEND and RECV logs into INFO.
- Add /etc/default/warewulfd

Closes #725

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-31 14:52:48 -06: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
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
Jonathon Anderson
05b951d78d Support dracut booting with GRUB
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 16:34:53 -04:00
Jonathon Anderson
53dae60e20 New, optional dracut.ipxe configuration
dracut.ipxe boots an initramfs detected in the container image. This
required a few small changes to warewulfd and the wwinit overlay to
accommodate the dracut initramfs configuring the network interface
before wwinit:

- Include .NetDevs in the ipxe configuration template, so that dracut
  can configure interfaces with the correct names.

- Configure NetworkManager to not keep the initramfs configuration, in
  stead applying the configuration found by wwinit.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:20:09 -04:00
xu yang
a322061fe9 Add initramfs stage to warewulfd
The initramfs stage supports serving an initramfs image from within the
container image, typically generated by dracut.

Signed-off-by: xu yang <xyang@ciq.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:14:21 -04:00
David McFarlane
41535cb8f9 Also prevent provisioning arbitrary overlays in secure mode
Signed-off-by: David McFarlane <54093156+Prepultrue@users.noreply.github.com>
2024-05-08 11:37:20 +10:00
Christian Goll
2ba9efa57c created kernel.FindKernel reduces code complexity
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-04-19 16:12:22 -06:00
John Hanks
cbf9178f10 Provide sprig functions in overlay templates 2024-03-11 09:36:52 +01: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
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
a36cb23319 added shim/grub find to provision process
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07: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
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
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
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
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
95ca053960 Lock server node db when updating discoverable node 2022-06-02 20:06:34 -05: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
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