Skip to content

Commit

Permalink
Merge pull request warewulf#1071 from riederd/main
Browse files Browse the repository at this point in the history
Enable creating a bonding network interface
  • Loading branch information
mslacken authored Feb 7, 2024
2 parents 69c1246 + 3a9654b commit 4a2969f
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- ability to create bonded network interfaces
- ipxe script to boot node from local disk.
- Option to change the `ipmitool` escape character
- New documentation for the hostlist syntax. #611
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
* Arnaud LECOMTE <[email protected]>
* Ryan Novosielski <[email protected]>
* Andreas Skau <[email protected]> @buzh
* Dietmar Rieder <[email protected]>
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@
id={{ $connection_id }}
interface-name={{ $netdev.Device }}
{{ if $netdev.Type -}}
{{ if eq $netdev.Type "bond-slave" -}}
slave-type=bond
{{- $conn := split $connection_id "_" }}
{{- $master := index $conn 0 }}
master={{ $master }}
type=ethernet
{{ else }}
type={{ $netdev.Type }}
{{ end -}}
autoconnect=true
{{ end -}}
{{ end -}}

{{ if $netdev.Hwaddr -}}
{{ if eq $netdev.Type "ethernet" -}}
Expand All @@ -26,6 +34,22 @@ mtu={{ $netdev.MTU }}
{{ end -}}
{{ end -}}

# bond
{{ if eq $netdev.Type "bond" -}}
[ethernet]
{{ if $netdev.MTU -}}
mtu={{ $netdev.MTU }}
{{ end -}}

[bond]
downdelay=0
miimon=100
mode=802.3ad
xmit_hash_policy=layer2+3
updelay=0

{{ end -}}

{{ if eq $netdev.Type "infiniband" -}}
[infiniband]
transport-mode=datagram
Expand All @@ -34,7 +58,7 @@ mtu={{ $netdev.MTU }}
{{ end -}}
{{ end -}}

{{ if $netdev.IpCIDR -}}
{{ if and ($netdev.IpCIDR) (ne $netdev.Type "bond-slave") -}}
[ipv4]
address={{ $netdev.IpCIDR }}
{{ if $netdev.Gateway -}}
Expand Down
12 changes: 12 additions & 0 deletions userdocs/contents/nodeconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,18 @@ container, kernel, and network:
# wwctl node list -a n001 | grep cluster
n001 cluster -- cluster01
To configure a bonded (link aggreagtion) network interface the following commands can be used:

.. code-block:: console
# wwctl node set --netname=bond0_member_1 --netdev=eth2 --type=bond-slave n001
# wwctl node set --netname=bond0_member_2 --netdev=eth3 --type=bond-slave n001
# wwctl node set --netname=bond0 --netdev=bond0 --onboot=true --type=bond --ipaddr 10.0.3.1 --netmask=255.255.255.0 --mtu=9000 n001
Note: the netnames of the member interterfaces need to match the "netname" of the bonded interface until the first "_" (in the example bond0)


Node Discovery
--------------

Expand Down

0 comments on commit 4a2969f

Please sign in to comment.