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

[xcvrd] add debug logs for y_cable change events/probes #195

Merged
merged 5 commits into from
Jun 24, 2021

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Jun 17, 2021

Signed-off-by: vaibhav-dahiya [email protected]

Description

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

How Has This Been Tested?

ran the changes on starlab testbed, by changing the file in the container.

Additional Information (Optional)

Signed-off-by: vaibhav-dahiya <[email protected]>
Signed-off-by: vaibhav-dahiya <[email protected]>

y_cable_platform_sfputil = platform_sfp
y_cable_platform_chassis = platform_chassis

fvs_updated = swsscommon.FieldValuePairs([('enable_log', 'false')])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can go with verbose or log_verbosity in case we are going to have various log verbosity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Signed-off-by: vaibhav-dahiya <[email protected]>
Signed-off-by: vaibhav-dahiya <[email protected]>
@vdahiya12 vdahiya12 merged commit 2d2749a into sonic-net:master Jun 24, 2021
andywongarista pushed a commit to andywongarista/sonic-platform-daemons that referenced this pull request Jun 30, 2021
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 <[email protected]>
qiluo-msft pushed a commit that referenced this pull request Jul 7, 2021
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 <[email protected]>
vdahiya12 pushed a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
…on. (sonic-net#195)

Platform vendor can add their own logic to determine the pcie
conifiguration revision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants