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:
@@ -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