Update network interface bonding configuration and documentation

- Closes: #1482
- Closes: #1280

This also corrects poor handling of whitespace around the "file" function
throughout the templates, given experiences with the network templates while
implementing the bond behavior. Since the file function actually does produce
output (that is parsed by Warewulf itself) it should not collaps prefix
whitespace.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-01-20 19:50:29 -07:00
parent 409b7269a7
commit c209dadc1f
20 changed files with 103 additions and 88 deletions

View File

@@ -72,9 +72,9 @@ func Test_ifcfgOverlay(t *testing.T) {
const ifcfg string = `backupFile: true
writeFile: true
Filename: ifcfg-default.conf
# This file is autogenerated by warewulf
TYPE=ethernet
# This file is autogenerated by warewulf
TYPE=Ethernet
DEVICE=wwnet0
NAME=default
BOOTPROTO=static
@@ -87,12 +87,13 @@ IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
DNS1=1.1.1.1
DNS2=1.0.0.1
backupFile: true
writeFile: true
Filename: ifcfg-secondary.conf
# This file is autogenerated by warewulf
TYPE=ethernet
TYPE=Ethernet
DEVICE=wwnet1
NAME=secondary
BOOTPROTO=static
@@ -119,8 +120,8 @@ HOSTNAME=node1
const ifcfg_vlan string = `backupFile: true
writeFile: true
Filename: ifcfg-tagged.conf
# This file is autogenerated by warewulf
# This file is autogenerated by warewulf
VLAN=yes
DEVICE=eth0.902
NAME=tagged
@@ -135,8 +136,7 @@ backupFile: true
writeFile: true
Filename: ifcfg-untagged.conf
# This file is autogenerated by warewulf
TYPE=ethernet
TYPE=Ethernet
DEVICE=eth0
NAME=untagged
BOOTPROTO=static
@@ -151,8 +151,10 @@ IPV6_FAILURE_FATAL=no
const ifcfg_routes string = `backupFile: true
writeFile: true
Filename: route-tagged.conf
# This file is autogenerated by warewulf
192.168.1.0/24 via 192.168.2.254
backupFile: true
writeFile: true
Filename: route-untagged.conf