-
Notifications
You must be signed in to change notification settings - Fork 526
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
add vrrpmgrd to support FRR-VRRP configuration #3106
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: philo <[email protected]>
@vvbrcm @madhupalu please help review |
cfgmgr/Makefile.am
Outdated
@@ -5,7 +5,7 @@ LIBNL_LIBS = -lnl-genl-3 -lnl-route-3 -lnl-3 | |||
SAIMETA_LIBS = -lsaimeta -lsaimetadata -lzmq | |||
COMMON_LIBS = -lswsscommon -lpthread | |||
|
|||
bin_PROGRAMS = vlanmgrd teammgrd portmgrd intfmgrd buffermgrd vrfmgrd nbrmgrd vxlanmgrd sflowmgrd natmgrd coppmgrd tunnelmgrd macsecmgrd fabricmgrd | |||
bin_PROGRAMS = vlanmgrd teammgrd portmgrd intfmgrd buffermgrd vrfmgrd nbrmgrd vxlanmgrd sflowmgrd natmgrd coppmgrd tunnelmgrd macsecmgrd fabricmgrd macvlanmgrd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer vrrpmgrd, looks like we used macvlanmgrd in the HLD, please make the changes if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sonic-net/SONiC#1446 (comment)
As suggested by @nser77, renaming vrrpmgrd to macvlanmgrd would enhance its generality within the whole SONiC architecture, making it more convenient for future functional components to use the macvlan interface type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What future functional components you are referring to here? the whole code is written for VRRP, wondering how you would use this macvlanmgr for other features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In VRRP, macvlanmgrd manages the configurations of adding, deleting, and addressing for macvlan devices based on VRRP configurations. Although at present only vrrp is using macvlan devices, as long as there is a similar function like VRRP which needs to use macvlan devices, you can subscribe to the corresponding table entries in macvlanmagrd, and then a simple adaptation can realize the unified management of macvlan devices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced with your answer, I don't see any mention of future functional components you are referring to here. You are trying to make the code changes with the assumption that some feature will make use of this macvlanmgrd.
If you really want to have a generic macvlanmgrd, remove VRRP name usage in the files and use it as a generic library so that any future module can use it, today VRRP feature can make use of generic MACVLAN mgr.
All I'm trying to say here is, either have the generic MACVLAN mgr and use it for the VRRP for now or specific VRRP mgr but not mixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,you are right. We will use vrrpmgrd and have also submitted the PR for HLD sonic-net/SONiC#1834. Could you please review it. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm, I agree with both of you.
string res; | ||
|
||
// link add vrrp type macvlan | ||
cmd << IP_CMD << " link add " << shellquote(vrrp_name) << " link " << shellquote(intf_alias) << " type macvlan mode bridge && "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it will fail if there are some problems while loading the macvlan module - which looks like is done by iproute2
in this case.
Would you prefer to check if the module can be loaded into the kernel before any operations or even manage it apart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great suggestion. For now, we haven't encountered any issues during our normal validation process. Other components, such as intfmgr and vlanmgr, currently also do not check whether the module is loaded before execution. We can start a new task to implement this code reinforcement for all components in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @philo-micas , thanks for your feedback and point of view.
I haven't checked other modules - really big effort - and yes, I agree that we may want to make a general consideration and evaluation here if also other SONiC's features are relaying over iprouter2
for module load and unload.
Just to expanding a bit more the topic, those operations require the CAP_SYS_MODULE
capability. I believe there is an on-going work regarding this - sonic-net/SONiC#1364 - but not sure if this dependency has been identified yet (I see swss
container has been retained).
We can start a new task to implement this code reinforcement for all components in the future.
Ok keep me posted plz I'm interested on it and happy to collaborate if possible.
hld:sonic-net/SONiC#1446
depends-on:sonic-net/sonic-swss-common#813