Skip to content
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

Remove if and log messages for event_publish #1

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions orchagent/crmorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,7 @@ void CrmOrch::checkCrmThresholds()
SWSS_LOG_WARN("%s THRESHOLD_EXCEEDED for %s %u%% Used count %u free count %u",
res.name.c_str(), threshType.c_str(), percentageUtil, cnt.usedCounter, cnt.availableCounter);

if (0 != event_publish(m_events_handle, "chk_crm_threshold", &params)) {
SWSS_LOG_WARN("Failed to publish event for if-state");
}
event_publish(m_events_handle, "chk_crm_threshold", &params);

res.exceededLogCounter++;
}
Expand Down
4 changes: 1 addition & 3 deletions orchagent/pfcwdorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,9 +952,7 @@ void PfcWdSwOrch<DropHandler, ForwardHandler>::report_pfc_storm(
id,
entry->portId);

if (0 != event_publish(m_events_handle, "pfc-storm", &params)) {
SWSS_LOG_WARN("Failed to publish event for pfc-storm");
}
event_publish(m_events_handle, "pfc-storm", &params);
}

template <typename DropHandler, typename ForwardHandler>
Expand Down
4 changes: 1 addition & 3 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2540,9 +2540,7 @@ bool PortsOrch::setHostIntfsOperStatus(const Port& port, bool isUp) const
isUp ? "UP" : "DOWN", port.m_alias.c_str());

event_params_t params = {{"ifname",port.m_alias},{"status",isUp ? "up" : "down"}};
if (0 != event_publish(m_events_handle, "if-state", &params)) {
SWSS_LOG_WARN("Failed to publish event for if-state");
}
event_publish(m_events_handle, "if-state", &params);
return true;
}

Expand Down