Restore some default behaviors

- If `init` is not specified, wwinit looks for /sbin/init, /etc/init,
  and /bin/init, matching dracut behavior.
- assume ipxe template=default if not set
- Display a warning during overlay build if an overlay list is empty

Issues:

- Closes: #1808
- Closes: #1813

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-03-24 17:29:24 -06:00
committed by Christian Goll
parent 9e9f37208c
commit 4367b56120
4 changed files with 39 additions and 4 deletions

View File

@@ -110,12 +110,18 @@ func BuildAllOverlays(nodes []node.Node, allNodes []node.Node, workerCount int)
for n := range nodeChan {
wwlog.Info("Building system overlay image for %s", n.Id())
wwlog.Debug("System overlays for %s: [%s]", n.Id(), strings.Join(n.SystemOverlay, ", "))
if len(n.SystemOverlay) < 1 {
wwlog.Warn("No system overlays defined for %s", n.Id())
}
if err := BuildOverlay(n, allNodes, "system", n.SystemOverlay); err != nil {
errChan <- fmt.Errorf("could not build system overlays %v for node %s: %w", n.SystemOverlay, n.Id(), err)
}
wwlog.Info("Building runtime overlay image for %s", n.Id())
wwlog.Debug("Runtime overlays for %s: [%s]", n.Id(), strings.Join(n.RuntimeOverlay, ", "))
if len(n.RuntimeOverlay) < 1 {
wwlog.Warn("No runtime overlays defined for %s", n.Id())
}
if err := BuildOverlay(n, allNodes, "runtime", n.RuntimeOverlay); err != nil {
errChan <- fmt.Errorf("could not build runtime overlays %v for node %s: %w", n.RuntimeOverlay, n.Id(), err)
}

View File

@@ -97,7 +97,11 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
}
} else if rinfo.stage == "ipxe" {
stage_file = path.Join(conf.Paths.Sysconfdir, "warewulf/ipxe/"+remoteNode.Ipxe+".ipxe")
template := remoteNode.Ipxe
if template == "" {
template = "default"
}
stage_file = path.Join(conf.Paths.Sysconfdir, "warewulf/ipxe", template+".ipxe")
kernelArgs := ""
kernelVersion := ""
if remoteNode.Kernel != nil {