Skip to content

Commit 677927e

Browse files
authored
Merge pull request #2 from SOSETH/bond-delay
Add delay_up option to bond
2 parents 898349e + caddfa9 commit 677927e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ It is configured by setting `netconf` for the host, there are the following opti
2020
* bond: Bonding interface: Like `if`, but additionally has:
2121
* slaves: List of slave interfaces
2222
* bondmode *(optional)*: Bond operation mode, per default 802.3ad (aka LACP) is used
23+
* delay_up: *(optional)*: Add a delay in post-up to allow for the bond device to settle before attempting DAD etc.
2324
* vlan: VLAN interface. The name is the vlan id, configuration is like `if`, additionally the following is required:
2425
* parent: Interface this VLAN should be created on
2526
* rt: Extra routing tables. Maps from name to number
@@ -40,6 +41,7 @@ netconf:
4041
gateway: 82.130.108.193
4142
dnssearch: sos.ethz.ch
4243
dns: 129.132.250.2
44+
delay_up: True
4345
vlan:
4446
2522:
4547
parent: bond0

templates/bond.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ iface {{ item.key }} inet {{ ipmode }}
2121
bond_xmit_hash_policy layer3+4
2222
bond_miimon 100
2323
bond_lacp-rate 1
24-
post-up echo 1000 > /sys/class/net/{{ item.key }}/bonding/ad_actor_sys_prio
24+
post-up {{ 'sleep 20 && ' if 'delay_up' in item.value and item.value.delay_up }}echo 1000 > /sys/class/net/{{ item.key }}/bonding/ad_actor_sys_prio
2525
{% endif %}
2626
{% else %}
2727
auto {{ item.key }}br

0 commit comments

Comments
 (0)