-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[multi asic] BGP monitor changes for multi asic #6920
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
to make BGPMON work for multi-asic platforms. Signed-off-by: Abhishek Dosi <[email protected]>
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@prsunny made some changes for IPTable class to make it generic so can be use for other rules also. please check. |
@arlakshm Config DB programming part looks good. Can you review the ip table rule programming part. |
@abdosi, the ip table programming looks good to me. |
from sonic_py_common import device_info | ||
from swsssdk import ConfigDBConnector | ||
from sonic_py_common import device_info,multi_asic | ||
from swsssdk import ConfigDBConnector, SonicDBConfig |
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.
for master we no longer use swsssdk, it is depracating. @qiluo-msft
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.
@qiluo-msft , are you going to refactor this?
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.
@arlakshm Could you just replace swsssdk
with swsscommon.swsscommon
? we are deprecating swsssdk
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.
change in latest commit
others looks good. |
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@@ -406,6 +512,9 @@ class HostConfigDaemon: | |||
self.kdumpCfg = KdumpCfg(self.config_db) | |||
self.kdumpCfg.load(self.config_db.get_table('KDUMP')) | |||
|
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.
@arlakshm
we need to do self.masicBgpMonCfg = None .
SIngle asic is getting exception.
Please update.
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.
@arlakshm updated in latest commit. Please check.
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.
@abdosi, lgtm.
Signed-off-by: Abhishek Dosi <[email protected]>
The sonic-net/sonic-buildimage#6920 adds support of adding BGP monitor session on one of the backend ASICs of Multi ASIC platforms. This PR enchances the show ip bgp summary command to display this session Also added unit tests for 'show ip bgp summary' for multi asic platforms
This PRis cherry-pick of master sonic-net#6920 Signed-off-by: Abhishek Dosi <[email protected]> Co-authored-by: Arvind <[email protected]>
@abdosi, The T0 failures doesn't seem to related to the changes in the PR. I have retrigger again, I will monitor the tests |
This PR is cherry-pick of master #6920 Why I did it Add support for BGP Monitors on multi asic SONiC platforms. How I did it On multi ASIC SONiC platforms, BGP monitor session will be established from Backend ASIC. To achieve this following changes are done Add BGP monitor configuration on the backend ASIC. The BGP monitor configuration is present in the DPG of the device in minigraph.xml of multi-ASIC device, so this configuration will be added to the config_db of the host, when the minigraph is loaded. To add configuration for this in the Backend ASIC, a new class MultiAsicBgpMonCfg is added to the hostcfgd service to update the config_db of the backend ASIC when the BGP_MONITOR table of the host config_db is updated. This way incremental BGP_MONITOR configuration can also be handled. Changes to establish BGP session with bgp monitor. Add route in host main routing table to go to one of pre-define backend asic Add IP table rule on front asic to mark the BGP packets with destination as IPv4 Loopback. Add IP rule in front asic namespace to match mark BGP packet and lookup default table Program the default route in FrontEnd asic name space docker default table as part of start.sh of the BGP container. It need to be done as part of start.sh otherwise FRR default route will get over-written. How to verify it Signed-off-by: Abhishek Dosi <[email protected]> Co-authored-by: Arvind <[email protected]>
/Azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
This pull request introduces 1 alert when merging 43dc774 into aa63c71 - view on LGTM.com new alerts:
|
The PR sonic-net/sonic-buildimage#6920 adds the support for swsscommon in `hostcfgd`. The PR test failure are seen because the `config_db.subscribe` doesnt work with swsscommon. This PR adds the support for the following python APIs - `config_db.subscribe` - `config_db.unsubscribe`
/azp run |
Pull request contains merge conflicts. |
The PR sonic-net/sonic-buildimage#6920 adds the support for swsscommon in `hostcfgd`. The PR test failure are seen because the `config_db.subscribe` doesnt work with swsscommon. This PR adds the support for the following python APIs - `config_db.subscribe` - `config_db.unsubscribe`
Why I did it
Add support for BGP Monitors on multi asic SONiC platforms.
How I did it
On multi ASIC SONiC platforms, BGP monitor session will be established from Backend ASIC.
To achieve this following changes are done
Add BGP monitor configuration on the backend ASIC.
The BGP monitor configuration is present in the DPG of the device in minigraph.xml of multi-ASIC device, so this configuration will be added to the config_db of the host, when the minigraph is loaded.
To add configuration for this in the Backend ASIC, a new class
MultiAsicBgpMonCfg
is added to the hostcfgd service to update the config_db of the backend ASIC when the BGP_MONITOR table of the host config_db is updated.This way incremental BGP_MONITOR configuration can also be handled.
Changes to establish BGP session with bgp monitor.
It need to be done as part of start.sh otherwise FRR default route will get over-written.
How to verify it
Run the tests
test_bgpmon.py
for multi asic.Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)