-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[FRR][sonic-cfggen] Support T2 chassis frontend #3019
Conversation
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
src/sonic-config-engine/minigraph.py
Outdated
if current_device['type'] == spine_chassis_frontend_role: | ||
chassis_vnet ='Vnet1' | ||
chassis_vxlan_tunnel = 'tunnel1' | ||
chassis_vni = 8000 |
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 think we should not hard code here. We can hardcode in the template. The same applies to Vnet1, tunnel1. name.
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 information (Vnet name, Vxlan tunnel name and vni) will be inserted to config DB. I don't know which template you refer to.
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.
bgpd.j2
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.
@lguohan I think this information is also necessary for vxlanmgrd
src/sonic-config-engine/minigraph.py
Outdated
|
||
results['VXLAN_TUNNEL'] = {chassis_vxlan_tunnel: { | ||
'source_ip': lo_addr | ||
}} |
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.
can we use the lo_addr directly in the bgpd.conf j2 template?
src/sonic-config-engine/minigraph.py
Outdated
|
||
# Enslave the interface to a Vnet | ||
if intf_name in phyport_intfs: | ||
phyport_intfs[intf_name] = {'vnet_name': chassis_vnet} |
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.
should we move this enslave logic into the template as well?
phyport_intfs[intf_name] = {'vnet_name': chassis_vnet} | ||
else: | ||
print >> sys.stderr, 'Warning: cannot find the key %s' % (intf_name) | ||
|
||
return results |
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.
all the extra logics you add in this file seem unnecessary, we should move all of them to template.
src/sonic-config-engine/minigraph.py
Outdated
|
||
# Special parsing for spine chassis frontend routers | ||
if current_device['type'] == spine_chassis_frontend_role: | ||
chassis_vnet ='Vnet1' |
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.
VnetFE
src/sonic-config-engine/minigraph.py
Outdated
# Special parsing for spine chassis frontend routers | ||
if current_device['type'] == spine_chassis_frontend_role: | ||
chassis_vnet ='Vnet1' | ||
chassis_vxlan_tunnel = 'tunnel1' |
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.
TunnelInt
src/sonic-config-engine/minigraph.py
Outdated
'vni': chassis_vni | ||
}} | ||
|
||
for intf in phyport_intfs: |
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 if the front panel port channel belong to vnet?
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.
as comments
retest this please |
can you resolve conflict? |
self.assertEqual(output.strip(), | ||
"{'Ethernet8': {}, " | ||
"('Ethernet8', '172.16.0.9/30'): {}, " | ||
"'Ethernet0': {'vnet_name': 'VnetFE'}, " |
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.
need port channel example.
New PR: #3100 |
- What I did
Support new role: T2 chassis frontend switch (SpineChassisFrontendRouter). The chassis frontend switch needs BGP-EVPN, Vxlan and Vnet support.
- How I did it
Modify minigraph parser to add Vnet and Vxlan informration for T2 chassis frontend
Add new frr, bgpd and zebra j2 templates to support BGP-EVPN
Add new tests to sonic-cfggen unit test scripts
- How to verify it
Run load_minigraph and verify entries in config DB and FRR configuration.
In config DB, you should be able to see the following entries:
In FRR docker, you should be able to see BGP-EVPN configuration as follows:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Wei Bai [email protected] and Ze Gan [email protected]