Properly configure a default IPMI template during wwctl upgrade nodes --add-defaults
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fixed panic in warewulfd if node netdev is only defined in a profile. #1817
|
||||
- Replaced unreadable >= character external sphinx module for pdf doc build.
|
||||
- Handle missing ipmi fields during bmc commands. #1768
|
||||
- Properly configure a default IPMI template during `wwctl upgrade nodes --add-defaults`.
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -122,6 +122,9 @@ func (legacy *NodesYaml) Upgrade(addDefaults bool, replaceOverlays bool, warewul
|
||||
defaultProfile.RuntimeOverlay = append(
|
||||
defaultProfile.RuntimeOverlay, genericSplitOverlays...)
|
||||
}
|
||||
if defaultProfile.Kernel == nil {
|
||||
defaultProfile.Kernel = new(node.KernelConf)
|
||||
}
|
||||
if len(defaultProfile.Kernel.Args) < 1 {
|
||||
defaultProfile.Kernel.Args = []string{"quiet", "crashkernel=no"}
|
||||
}
|
||||
@@ -153,6 +156,12 @@ func (legacy *NodesYaml) Upgrade(addDefaults bool, replaceOverlays bool, warewul
|
||||
},
|
||||
}
|
||||
}
|
||||
if defaultProfile.Ipmi == nil {
|
||||
defaultProfile.Ipmi = new(node.IpmiConf)
|
||||
}
|
||||
if defaultProfile.Ipmi.Template == "" {
|
||||
defaultProfile.Ipmi.Template = "ipmitool.tmpl"
|
||||
}
|
||||
}
|
||||
return upgraded
|
||||
}
|
||||
|
||||
@@ -553,6 +553,8 @@ nodes:
|
||||
nodeprofiles:
|
||||
default:
|
||||
ipxe template: default
|
||||
ipmi:
|
||||
template: ipmitool.tmpl
|
||||
runtime overlay:
|
||||
- hosts
|
||||
- ssh.authorized_keys
|
||||
@@ -634,6 +636,8 @@ nodes:
|
||||
nodeprofiles:
|
||||
custom: {}
|
||||
default:
|
||||
ipmi:
|
||||
template: ipmitool.tmpl
|
||||
ipxe template: default
|
||||
runtime overlay:
|
||||
- hosts
|
||||
@@ -891,6 +895,8 @@ nodeprofiles:
|
||||
upgradedYaml: `
|
||||
nodeprofiles:
|
||||
default:
|
||||
ipmi:
|
||||
template: ipmitool.tmpl
|
||||
ipxe template: default
|
||||
runtime overlay:
|
||||
- hosts
|
||||
|
||||
Reference in New Issue
Block a user