Merge pull request #960 from mslacken/OverlayPaths
propagate paths to overlays and use for wwclient
This commit is contained in:
@@ -114,6 +114,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- added general test framework which creates temporary directories on the fly
|
||||
- only write IPMI if write is true
|
||||
- Don't show an error if image files for containers can't be found. #933
|
||||
- Make configured paths available in overlays as `.Path` #960
|
||||
|
||||
## [4.4.0] 2023-01-18
|
||||
|
||||
|
||||
@@ -49,13 +49,13 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
ipmiCmd := power.IPMI{
|
||||
NodeName: node.Id.Get(),
|
||||
HostName: node.Ipmi.Ipaddr.Get(),
|
||||
Port: node.Ipmi.Port.Get(),
|
||||
User: node.Ipmi.UserName.Get(),
|
||||
Password: node.Ipmi.Password.Get(),
|
||||
AuthType: "MD5",
|
||||
Interface: node.Ipmi.Interface.Get(),
|
||||
NodeName: node.Id.Get(),
|
||||
HostName: node.Ipmi.Ipaddr.Get(),
|
||||
Port: node.Ipmi.Port.Get(),
|
||||
User: node.Ipmi.UserName.Get(),
|
||||
Password: node.Ipmi.Password.Get(),
|
||||
AuthType: "MD5",
|
||||
Interface: node.Ipmi.Interface.Get(),
|
||||
EscapeChar: node.Ipmi.EscapeChar.Get(),
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ func NodeList(nodeGet *wwapiv1.GetNodeList) (nodeList wwapiv1.NodeList, err erro
|
||||
fmt.Sprintf("%s:=:%s:=:%s:=:%s:=:%s", "NODE NAME", "IPMI IPADDR", "IPMI PORT", "IPMI USERNAME", "IPMI INTERFACE"))
|
||||
for _, n := range node.FilterByName(nodes, nodeGet.Nodes) {
|
||||
nodeList.Output = append(nodeList.Output,
|
||||
fmt.Sprintf("%s:=:%s:=:%s:=:%s:=:%s:=:%s", n.Id.Print(),
|
||||
fmt.Sprintf("%s:=:%s:=:%s:=:%s:=:%s:=:%s", n.Id.Print(),
|
||||
n.Ipmi.Ipaddr.Print(),
|
||||
n.Ipmi.Port.Print(),
|
||||
n.Ipmi.UserName.Print(),
|
||||
|
||||
@@ -62,7 +62,7 @@ type IpmiConf struct {
|
||||
Port string `yaml:"port,omitempty" lopt:"ipmiport" comment:"Set the IPMI port"`
|
||||
Gateway string `yaml:"gateway,omitempty" lopt:"ipmigateway" comment:"Set the IPMI gateway" type:"IP"`
|
||||
Interface string `yaml:"interface,omitempty" lopt:"ipmiinterface" comment:"Set the node's IPMI interface (defaults: 'lan')"`
|
||||
EscapeChar string `yaml:"escapechar,omitempty" lopt:"ipmiescapechar" comment:"Set the IPMI escape character (defaults: '~')"`
|
||||
EscapeChar string `yaml:"escapechar,omitempty" lopt:"ipmiescapechar" comment:"Set the IPMI escape character (defaults: '~')"`
|
||||
Write string `yaml:"write,omitempty" lopt:"ipmiwrite" comment:"Enable the write of impi configuration (true/false)" type:"bool"`
|
||||
Tags map[string]string `yaml:"tags,omitempty" lopt:"ipmitagadd" comment:"add ipmitags"`
|
||||
TagsDel []string `yaml:"tagsdel,omitempty" lopt:"ipmitagdel" comment:"remove ipmitags"` // should not go to disk only to wire
|
||||
|
||||
@@ -65,6 +65,7 @@ func InitStruct(nodeInfo *node.NodeInfo) TemplateStruct {
|
||||
tstruct.Nfs = *controller.NFS
|
||||
tstruct.Dhcp = *controller.DHCP
|
||||
tstruct.Tftp = *controller.TFTP
|
||||
tstruct.Paths = *controller.Paths
|
||||
tstruct.Warewulf = *controller.Warewulf
|
||||
tstruct.Ipaddr = controller.Ipaddr
|
||||
tstruct.Ipaddr6 = controller.Ipaddr6
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /warewulf/config
|
||||
# Only start if the systemd is no available
|
||||
test -e /usr/lib/systemd/systemd && exit 0
|
||||
echo "Starting wwclient"
|
||||
nohup /warewulf/bin/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
||||
11
overlays/wwinit/warewulf/init.d/80-wwclient.ww
Normal file
11
overlays/wwinit/warewulf/init.d/80-wwclient.ww
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# This file is autogenerated by warewulf
|
||||
# Host: {{.BuildHost}}
|
||||
# Time: {{.BuildTime}}
|
||||
# Source: {{.BuildSource}}
|
||||
|
||||
. /warewulf/config
|
||||
# Only start if the systemd is not available
|
||||
test -e /usr/lib/systemd/systemd && exit 0
|
||||
echo "Starting wwclient"
|
||||
nohup {{ .Paths.WWClientdir }}/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
||||
Reference in New Issue
Block a user