-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable IPRoute to pass teamd config #699
Comments
Yep, to be fixed asap. Thanks for heads-up! |
It should work now like that: import json
from pyroute2 import IPRoute
config = {'runner': {'name': 'activebackup'},
'link_watch': {'name': 'ethtool'},
'hwaddr': '00:11:22:33:44:55'}
ipr = IPRoute()
ipr.link('add',
ifname='myteam',
kind='team',
team_config=json.dumps(config)) Note regarding the In the case of conflict between the config and TODO: support config options like hwaddr that are common for all the devices as normal arguments as well. Not closing the issue. |
Thanks Pete! That was fast! Ack on device being autofilled from ifname. Tested locally with the following script:
$ sudo python3 test-pyroute-team.py
$ pgrep -fa teamd
20027 teamd -d -n -c {"runner": {"name": "roundrobin"}, "link_watch": {"name": "ethtool"}, "hwaddr": "00:11:22:33:44:55", "device": "myteam"} |
Hi, I have a related question, for Team pyroute2 is directly calling teamd/teamdctl. Is this because team doesn't use netlink configuration at all or because it is somehow complicated? I'm asking because currently LNST uses pyroute2 specifically for netlink quite a bit and it feels a little weird having Team be different but still through pyroute2... |
@olichtne , as I understand, team interfaces are backed with the There are several solutions. One is implemented right now: we don't run any |
That makes sense, like I've said I'm not too familiar with how teams are implemented so I was just asking for clarification. Thanks for the answer :). |
https://build.opensuse.org/request/show/810907 by user dirkmueller + dimstar_suse - update to 0.5.12: * rtnl: implement team config pass <svinota/pyroute2#699> * ndb.auth: example auth modules for RADIUS and OpenStack / Keystone * cli: syntax fixes
Currently it is impossible to add a team device with specific configuration using IPRoute. Instead a hardcoded config is used.
Code sample:
The text was updated successfully, but these errors were encountered: