[FRR][sonic-cfggen] Support T2 chassis frontend#3019
[FRR][sonic-cfggen] Support T2 chassis frontend#3019baiwei0427 wants to merge 12 commits intosonic-net:masterfrom baiwei0427:master
Conversation
Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
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.
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.
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.
@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.
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.
should we move this enslave logic into the template as well?
| else: | ||
| print >> sys.stderr, 'Warning: cannot find the key %s' % (intf_name) | ||
|
|
||
| return results |
There was a problem hiding this comment.
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' |
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' |
src/sonic-config-engine/minigraph.py
Outdated
| 'vni': chassis_vni | ||
| }} | ||
|
|
||
| for intf in phyport_intfs: |
There was a problem hiding this comment.
what if the front panel port channel belong to vnet?
|
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.
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 baiwei0427@gmail.com and Ze Gan ganze718@gmail.com