-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make openbmp support redis subscription/population on sonic. #7
Make openbmp support redis subscription/population on sonic. #7
Conversation
a2918c1
to
283d443
Compare
283d443
to
f3dc99b
Compare
…nk/sonic-openbmp into fenpan_openbmp_redis
… into fenpan_openbmp_redis
… into fenpan_openbmp_redis
…nk/sonic-openbmp into fenpan_openbmp_redis
…nk/sonic-openbmp into fenpan_openbmp_redis
Server/src/RedisManager.cpp
Outdated
LOG_INFO("RedisManager %s is disabled", table.c_str()); | ||
return false; | ||
} | ||
std::unique_ptr<swss::Table> stateBMPTable = std::unique_ptr<swss::Table>(new swss::Table(stateDb_.get(), table)); |
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.
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.
updated, and upgraded into c++14 correspondingly, seems swss-common uses c++14 as well.
/*********************************************************************//** | ||
* Constructor for class | ||
***********************************************************************/ | ||
RedisManager::~RedisManager() { |
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.
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.
no resource to be cleanup now and could be used as place holder.
Server/src/RedisManager.cpp
Outdated
std::unique_ptr<swss::Table> stateBMPTable = std::unique_ptr<swss::Table>(new swss::Table(stateDb_.get(), table)); | ||
std::string fullKey; | ||
for (const auto& key : keys) { | ||
fullKey += key; |
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.
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.
updated.
|
||
DEBUG("RedisManager WriteBMPTable key = %s", fullKey.c_str()); | ||
|
||
stateBMPTable->set(fullKey, fieldValues); |
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.
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.
added more debug log into MsgBusImpl_redis class for more constructive looking, which triggers this WriteBMPTable()
…nk/sonic-openbmp into fenpan_openbmp_redis
…nk/sonic-openbmp into fenpan_openbmp_redis
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.
LGTM
/azpw run Azure.sonic-bmp |
/AzurePipelines run Azure.sonic-bmp |
Azure Pipelines successfully started running 1 pipeline(s). |
/AzurePipelines run Azure.sonic-bmp |
Azure Pipelines successfully started running 1 pipeline(s). |
/AzurePipelines run Azure.sonic-bmp |
Azure Pipelines successfully started running 1 pipeline(s). |
…nk/sonic-openbmp into fenpan_openbmp_redis
…nk/sonic-openbmp into fenpan_openbmp_redis
…nk/sonic-openbmp into fenpan_openbmp_redis
Work item tracking
Microsoft ADO (number only):27184382
Make openbmp support redis subscription/population on sonic.
This PR contains below changes:
3.1 bmpcfgd will be daemon which subscribe config_db table enablement, like bgp_neighbor_table/bgp_rib_in_table/bgp_rib_out_table, once config is changed, bmpcfgd will stop openbmpd, clear bmp related tables, then restart openbmpd
3.2 openbmpd will be daemon which accept connection from bgp, and populate BMP_STATE_DB for relevant bmp table like BGP_NEIGHBOR, etc.