Fix a panic in warewulfd when no kernel fields are specified
- Fixes: #1689 Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
- Document defining kernel args that include commas. #1679
|
||||
- Recommend installing ipmitool with Warewulf package. #970
|
||||
|
||||
### Changed
|
||||
|
||||
- `wwctl node list <--yaml|--json>` outputs a map keyed by node name. #1667
|
||||
@@ -31,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Prefer parent profile values over child profile values. #1672
|
||||
- Don't attempt to back-up an output file that doesn't exist during upgrade. #1671
|
||||
- Specify init=/init when booting with Grub+dracut. #1573
|
||||
- Fix a warewulfd panic when no kernel fields are specified. #1689
|
||||
|
||||
## v4.6.0rc1, 2025-01-29
|
||||
|
||||
|
||||
@@ -66,7 +66,6 @@ func FindInitramfsFromPattern(imageName string, version string, pattern string)
|
||||
continue
|
||||
} else {
|
||||
initramfs := &Initramfs{Path: filepath.Join("/", path), imageName: imageName}
|
||||
wwlog.Info("%v", initramfs)
|
||||
if strings.HasPrefix(initramfs.Version(), version) {
|
||||
return initramfs
|
||||
}
|
||||
|
||||
@@ -98,6 +98,12 @@ 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")
|
||||
kernelArgs := ""
|
||||
kernelVersion := ""
|
||||
if remoteNode.Kernel != nil {
|
||||
kernelArgs = strings.Join(remoteNode.Kernel.Args, " ")
|
||||
kernelVersion = remoteNode.Kernel.Version
|
||||
}
|
||||
tmpl_data = &templateVars{
|
||||
Id: remoteNode.Id(),
|
||||
Cluster: remoteNode.ClusterName,
|
||||
@@ -107,8 +113,8 @@ func ProvisionSend(w http.ResponseWriter, req *http.Request) {
|
||||
Hostname: remoteNode.Id(),
|
||||
Hwaddr: rinfo.hwaddr,
|
||||
ImageName: remoteNode.ImageName,
|
||||
KernelArgs: strings.Join(remoteNode.Kernel.Args, " "),
|
||||
KernelVersion: remoteNode.Kernel.Version,
|
||||
KernelArgs: kernelArgs,
|
||||
KernelVersion: kernelVersion,
|
||||
NetDevs: remoteNode.NetDevs,
|
||||
Tags: remoteNode.Tags}
|
||||
} else if rinfo.stage == "kernel" {
|
||||
|
||||
Reference in New Issue
Block a user