Skip to content

Commit

Permalink
Events: Degrade log level to info for network related. (#698)
Browse files Browse the repository at this point in the history
Why I did it
LogAnalyzer in test runs take ERR log messages as failure.
Eventd reports some network related issues as error, which could happen due to external network state.

How I did it
Reduce ERR to INFO.

How to verify it
Per issue, "config reload" triggers it,
Do config-reload and ensure no ERR message from eventd.
Issue #12303
  • Loading branch information
renukamanavalan committed Oct 11, 2022
1 parent 48cdb3f commit bcf48b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions common/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ EventSubscriber::event_receive(event_receive_op_C_t &op)
rc = event_receive(event_str, op.missed_cnt, op.publish_epoch_ms);
if (rc != 0) {
if (rc != 11) {
SWSS_LOG_ERROR("failed to receive event. rc=%d", rc);
SWSS_LOG_INFO("failed to receive event. rc=%d", rc);
}
goto out;
}
Expand All @@ -443,7 +443,7 @@ EventSubscriber::event_receive(event_receive_op_t &op)
rc = event_receive(event_str, op.missed_cnt, op.publish_epoch_ms);
if (rc != 0) {
if (rc != 11) {
SWSS_LOG_ERROR("failed to receive event. rc=%d", rc);
SWSS_LOG_INFO("failed to receive event. rc=%d", rc);
}
goto out;
}
Expand Down Expand Up @@ -483,7 +483,7 @@ EventSubscriber::event_receive(string &event_str, uint32_t &missed_cnt,
rc = zmq_message_read(m_socket, 0, evt_source, event_data);
if (rc != 0) {
if (rc != 11) {
SWSS_LOG_ERROR("Failure to read message from sock rc=%d", rc);
SWSS_LOG_INFO("Failure to read message from sock rc=%d", rc);
}
goto out;
}
Expand Down
6 changes: 3 additions & 3 deletions common/events_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ using namespace chrono;
#define RET_ON_ERR(res, msg, ...)\
if (!(res)) {\
int _e = errno; \
SWSS_LOG_ERROR(msg, ##__VA_ARGS__); \
SWSS_LOG_ERROR("last:errno=%d", _e); \
SWSS_LOG_INFO(msg, ##__VA_ARGS__); \
SWSS_LOG_INFO("last:errno=%d", _e); \
goto out; }

static const int LINGER_TIMEOUT = 100; /* Linger timeout in milliseconds */
Expand Down Expand Up @@ -323,7 +323,7 @@ struct serialization
/* override with zmq err */
rc = zmq_errno();
if (rc != 11) {
SWSS_LOG_ERROR("Failure to read part rc=%d", rc);
SWSS_LOG_INFO("Failure to read part rc=%d", rc);
}
}
out:
Expand Down

0 comments on commit bcf48b2

Please sign in to comment.