Right, I looked at the code, then read the docs more closely and finally figured out that 'lacp_prio' is not the select_policy I want, since that uses lacp protocol priority. I want 'port_options', which basically mimics what loadbalance does, but with lacp-aggregated links.

Of course that didn't work, because I'm probably the first person to try this and not give up the minute it didn't work. But that's a separate email with the bug report.

2016-08-16 17:02 GMT+02:00 Jiri Pirko <jiri@resnulli.us>:
Tue, Aug 16, 2016 at 04:31:52PM CEST, mariusz.g.mazur@gmail.com wrote:
>And if I reverse the priorities in the config, lacp_key: 2 ports still get
>prioritized. I'm completely confused. Why are the lacp_prio port values
>ignored?

Odd. Just dive into the code. teamd_lacp.c

>
>2016-08-16 16:20 GMT+02:00 Mariusz Mazur <mariusz.g.mazur@gmail.com>:
>
>> Man for teamd.conf states:
>>
>>               lacp_prio — Aggregator with highest priority according  to
>> LACP
>>               standard  will  be  selected. Aggregator priority is
>> affected by
>>               per-port option lacp_prio.
>>
>>        ports.PORTIFNAME.lacp_prio (int)
>>               Port priority according to LACP standard. The lower number
>> means
>>               higher priority.
>>
>>
>> This is actually the opposite of what's happening. The ports with the
>> highest lacp_prio number, not the lowest, are what gets to become master.
>> Here's my current config:
>>
>> {
>>         "device":               "team0",
>>         "hwaddr":               "00:0a:f7:06:1e:68",
>>         "runner": {
>>                 "name": "lacp",
>>                 "active": true,
>>                 "fast_rate": true,
>>                 "tx_hash": ["eth", "ipv4", "ipv6"]
>>         },
>>         "link_watch":           {"name": "ethtool"},
>>         "agg_select_policy":    "lacp_prio",
>>         "ports":                {
>>                          "enp17s0f0": {"lacp_prio": 1, "lacp_key": 1},
>>                          "eno2": {"lacp_prio": 1, "lacp_key": 1},
>>                          "eno3": {"lacp_prio": 1, "lacp_key": 1},
>>                          "enp17s0f1": {"lacp_prio": 200, "lacp_key": 2},
>>                          "eno4": {"lacp_prio": 200, "lacp_key": 2},
>>                          "eno5": {"lacp_prio": 200, "lacp_key": 2}
>>                                 }
>> }
>>
>>
>> And the ports with lacp_prio: 200 are the master:
>>
>> [root@vc1n3 interfaces]# teamdctl team0 state|egrep '^  en|aggre'
>>   eno2
>>       aggregator ID: 2
>>   eno3
>>       aggregator ID: 2
>>   eno4
>>       aggregator ID: 3, Selected
>>   eno5
>>       aggregator ID: 3, Selected
>>   enp17s0f0
>>       aggregator ID: 2
>>   enp17s0f1
>>       aggregator ID: 3, Selected
>>
>> And yes, if I shut down the lacp_key: 2 ports and then reenable them
>> later, it switches back to them as the Selected ones.
>>
>>
>>

>_______________________________________________
>libteam mailing list
>libteam@lists.fedorahosted.org
>https://lists.fedorahosted.org/admin/lists/libteam@lists.fedorahosted.org