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

[ycable] add changes for correcting telemetry values for 'active-active' #341

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Mar 4, 2023

This change creates unknown, N/A values for active-standby cable types for active-active type cable.
Since streaming telemetry today looks for both active-active and active-standby for posting values to State DB, this change introduces a one time posting of fields with 'pseudo-cable' type when channels are attempted to be created by ycabled.

Description

Motivation and Context

How Has This Been Tested?

UT and posting the changes on test device.

Additional Information (Optional)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Copy link

@zjswhhh zjswhhh left a comment

Choose a reason for hiding this comment

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

lgtm!

@prgeor - can you also take a look please? We need this fix in next 202205 image. Thanks!!

@@ -2232,7 +2236,7 @@ def post_port_mux_info_to_db(logical_port_name, mux_tbl, asic_index, y_cable_tbl

for physical_port in physical_port_list:

if not y_cable_wrapper_get_presence(physical_port):
if not y_cable_wrapper_get_presence(physical_port) or cable_type == 'pseudo-cable':
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is 'pseudo-cable'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a one-time call to make sure when the gRPC channels/stubs etc are created, ycabled posts the active-standby fields but only as unknown/N/a. The reason for doing it is ST today depends on having this fields populated albeit N/A or unknown, to post the full data to Kusto DB.
this pseudo-cable logic takes care of it, and is only called once when Cable is either inserted/or ycabled spawns

@prgeor prgeor self-assigned this Mar 6, 2023
@prgeor prgeor added the Y-Cable label Mar 6, 2023
@vdahiya12 vdahiya12 merged commit 03374b2 into sonic-net:master Mar 7, 2023
StormLiangMS pushed a commit that referenced this pull request Mar 7, 2023
…ve' (#341)

* [ycable] add changes for correcting telemetry values for 'active-active'

This change creates unknown, N/A values for active-standby cable types for active-active type cable.
Since streaming telemetry today looks for both active-active and active-standby for posting values to State DB, this change introduces a one time posting of fields with 'pseudo-cable' type when channels are attempted to be created by ycabled.

Description
Motivation and Context
How Has This Been Tested?
UT and posting the changes on test device.

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
yxieca pushed a commit that referenced this pull request Mar 7, 2023
…ve' (#341)

* [ycable] add changes for correcting telemetry values for 'active-active'

This change creates unknown, N/A values for active-standby cable types for active-active type cable.
Since streaming telemetry today looks for both active-active and active-standby for posting values to State DB, this change introduces a one time posting of fields with 'pseudo-cable' type when channels are attempted to be created by ycabled.

Description
Motivation and Context
How Has This Been Tested?
UT and posting the changes on test device.

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
AntonHryshchuk added a commit to AntonHryshchuk/sonic-buildimage that referenced this pull request Mar 8, 2023
Update sonic-platform-daemons submodule pointer to include the following:
* 03374b2 [ycable] add changes for correcting telemetry values for 'active-active' ([sonic-net#341](sonic-net/sonic-platform-daemons#341))

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
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.

5 participants