-
Notifications
You must be signed in to change notification settings - Fork 543
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
[orchagent]: Publish identified events via structured-events channel #2446
Conversation
/azp run Azure.sonic-swss |
Azure Pipelines successfully started running 1 pipeline(s). |
orchagent/orchdaemon.cpp
Outdated
@@ -97,7 +100,9 @@ bool OrchDaemon::init() | |||
|
|||
string platform = getenv("platform") ? getenv("platform") : ""; | |||
|
|||
gCrmOrch = new CrmOrch(m_configDb, CFG_CRM_TABLE_NAME); | |||
m_events_handle = events_init_publisher("sonic-events-swss"); |
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.
Please have this as a global variable so that we don't have to pass for each orch and change the signature in all places.
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.
Would it be better to declare this as extern in orch.h or in the .cpp files that uses it?
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.
Please have this as a global variable so that we don't have to pass for each orch and change the signature in all places.
This is the right approach. 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.
extern in the .cpp file that uses it
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.
Done
Remove handle from signature and make externs
@@ -3,7 +3,7 @@ | |||
|
|||
#include "crmorch.h" | |||
|
|||
CrmOrch::CrmOrch(swss::DBConnector *db, std::string tableName) : Orch(db, std::vector<std::string>{}) | |||
CrmOrch::CrmOrch(swss::DBConnector *db, std::string tableName, event_handle_t) : Orch(db, std::vector<std::string>{}) |
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.
You may want to revert 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.
Done
orchagent/portsorch.cpp
Outdated
@@ -352,7 +353,8 @@ static bool isValidPortTypeForLagMember(const Port& port) | |||
* bridge. By design, SONiC switch starts with all bridge ports removed from | |||
* default VLAN and all ports removed from .1Q bridge. | |||
*/ | |||
PortsOrch::PortsOrch(DBConnector *db, DBConnector *stateDb, vector<table_name_with_pri_t> &tableNames, DBConnector *chassisAppDb) : | |||
PortsOrch::PortsOrch(DBConnector *db, DBConnector *stateDb, vector<table_name_with_pri_t> &tableNames, |
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 you please revert this change if its not modified?
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.
Done
Revert unneeded changes
…channel (sonic-net#2446)" This reverts commit 7cc035f.
What I did
Ref: sonic-net/SONiC#954
Three events identified are now published via events channel.
Why I did it
To publish events per HLD.
How I verified it
When the event occurs,
Details if related