2abdf8dc58
* [libteam] Add fallback support for single-member-port LAG * Allow the port to be selected if the LAG is configured with fallback and port is in defaulted state due to missing LACP PDUs from remote end * Only enable port if LAG is admin up and the member port is link up * [team] Add lacp fallback config to teamd.j2 template * [teamd] Resolve config conflict between fallback and minlink * Remove min_link config if fallback is configured * Add support for fallback config in minigraph * [teamd] Only enable fallback if it is single-member-port LAG Signed-off-by: Haiyang Zheng <haiyang.z@alibaba-inc.com> * [teamd] Removing the admin status check in lacp_port_link_update Will submit another pull request to fix this issue. Signed-off-by: Haiyang Zheng <haiyang.z@alibaba-inc.com>
26 lines
677 B
Django/Jinja
26 lines
677 B
Django/Jinja
{
|
|
"device": "{{ pc }}",
|
|
"hwaddr": "{{ hwaddr }}",
|
|
"runner": {
|
|
"name": "lacp",
|
|
"active": true,
|
|
{% if PORTCHANNEL[pc]['fallback'] and ((PORTCHANNEL[pc]['members'] | length) == 1) %}
|
|
"fallback": {{ PORTCHANNEL[pc]['fallback'] }},
|
|
{% else %}
|
|
{# Use 75% links upperbound as min-links #}
|
|
"min_ports": {{ (PORTCHANNEL[pc]['members'] | length * 0.75) | round(0, 'ceil') | int }},
|
|
{% endif %}
|
|
"tx_hash": ["eth", "ipv4", "ipv6"]
|
|
},
|
|
"link_watch": {
|
|
"name": "ethtool"
|
|
},
|
|
"ports": {
|
|
{% for member in PORTCHANNEL[pc]['members'] %}
|
|
"{{ member }}": {}{% if not loop.last %},{% endif %}
|
|
|
|
{% endfor %}
|
|
}
|
|
}
|
|
|