Skip to content

Commit

Permalink
[interfaces]: Bring up LAG members before they are enslaved (#505)
Browse files Browse the repository at this point in the history
Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
  • Loading branch information
Shuotian Cheng authored and lguohan committed Apr 14, 2017
1 parent abf54c2 commit b305a50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion files/image_config/interfaces/interfaces.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ iface {{ member }} inet manual
{% endfor %}
{% if minigraph_portchannels.keys() | length %}
# "|| true" is added to suppress the error when interface is already a member of LAG
# "ip link show | grep -q master" is added to ensure interface is enslaved
{% endif %}
{% for pc in minigraph_portchannels.keys()|sort %}
{% for member in minigraph_portchannels[pc]['members'] %}
auto {{ member }}
allow-hotplug {{ member }}
iface {{ member }} inet manual
pre-up teamdctl {{ pc }} port add {{ member }} || true
post-up ip link show {{ pc }} && ifconfig {{ member }} up
post-up ip link show {{ member }} | grep -q master && ifconfig {{ member }} up
post-down ifconfig {{ member }} down
#
{% endfor %}
Expand Down

0 comments on commit b305a50

Please sign in to comment.