You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[xcvrd] add debug logs for y_cable change events/probes (#195)
This PR adds support for logging required in debugging events for change/probe requests received by xcvrd from swss and linkmgr into state DB.
a typical log would look like this:
Jun 17 05:55:39.302379 NOTICE pmon#xcvrd[33]: Y_CABLE_DEBUG: trying to enable/disable debug logs
Jun 17 05:55:39.302379 NOTICE pmon#xcvrd[33]: Y_CABLE_DEBUG: received an event for port transition Ethernet4
Jun 17 05:55:39.302575 NOTICE pmon#xcvrd[33]: Y_CABLE_DEBUG: xcvrd trying to transition port Ethernet4 from standby to active
Jun 17 05:55:39.307872 NOTICE pmon#xcvrd[33]: Y_CABLE_DEBUG: Successful in toggling mux to ToR A for port 2
where both probe events and change events are logged inside xcvrd.
Motivation and Context
This is required for xcvrd to log the events which it receives from other modules when we want to see the completion of events
as to what triggered the event and at which stage it failed without restarting pmon/xcvrd
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
helper_logger.log_warning("ERR: Got a change event for toggle but could not toggle the mux-direction for port {} state from {} to {}, writing unknown".format(
@@ -1085,6 +1106,7 @@ def task_worker(self):
1085
1106
('read_side', read_side),
1086
1107
('active_side', str(active_side))])
1087
1108
y_cable_tbl[asic_index].set(port, fvs_updated)
1109
+
helper_logger.log_debug("Y_CABLE_DEBUG: xcvrd successful to transition port {} from {} to {} and write back to the DB".format(port, old_status, new_status))
1088
1110
helper_logger.log_info("Got a change event for toggle the mux-direction active side for port {} state from {} to {}".format(
0 commit comments