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

add data for telemtery enhancement for 'active-active' cable type #332

Merged
merged 8 commits into from
Jan 21, 2023

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Jan 16, 2023

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
This PR adds logic to add the following gRPC relevant telemetry schema fields in the state DB table
MUX_CABLE_INFO

1) "self_link_state"
2) "up"
3) "peer_link_state"
4) "up"
5) "self_oper_state"
6) "up"
7) "peer_oper_state"
8) "up"
9) "server_version"
10) "1.0"
11) "grpc_connection_status"
12) "READY"
13) "self_mux_direction"
14) "active"
15) "peer_mux_direction"
16) "active"
17) "peer_mux_direction_probe_count"
18) "23"
19) "mux_direction_probe_count"
20) "23"
21) "link_state_probe_count"
22) "1"
23) "peer_link_state_probe_count"
24) "1"
25) "operation_state_probe_count"
26) "1"
27) "peer_operation_state_probe_count"
28)"1"

This data will allow telemetry to check gRPC stats and version of the server and be able to raise alert if needed appropriatley.

Description

gPRC data for telemetry
appropriate logic is added for handling the gRPC stats and RPC's are called and counted as appropriate

Motivation and Context

How Has This Been Tested?

UT and putting the changes on the testbed

Additional Information (Optional)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Comment on lines +1715 to +1720
if query_type == "link_state":
grpc_port_stats[port]["link_state_probe_count"] = str(int(stat.get("link_state_probe_count", 0)) + 1 )
grpc_port_stats[port]["peer_link_state_probe_count"] = str(int(stat.get("peer_link_state_probe_count", 0)) + 1 )
elif query_type == "oper_state":
grpc_port_stats[port]["operation_state_probe_count"] = str(int(stat.get("operation_state_probe_count", 0)) + 1 )
grpc_port_stats[port]["peer_operation_state_probe_count"] = str(int(stat.get("peer_operation_state_probe_count", 0)) + 1 )
Copy link

Choose a reason for hiding this comment

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

Just being curious, what are the counters used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These counters are for noting how many time gRPC API's are being called from ycabled's perspective.

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.

@vdahiya12 vdahiya12 merged commit 906d198 into sonic-net:master Jan 21, 2023
yxieca pushed a commit that referenced this pull request Jan 23, 2023
Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
This PR adds logic to add the following gRPC relevant telemetry schema fields in the state DB table
MUX_CABLE_INFO

1) "self_link_state"
2) "up"
3) "peer_link_state"
4) "up"
5) "self_oper_state"
6) "up"
7) "peer_oper_state"
8) "up"
9) "server_version"
10) "1.0"
11) "grpc_connection_status"
12) "READY"
13) "self_mux_direction"
14) "active"
15) "peer_mux_direction"
16) "active"
17) "peer_mux_direction_probe_count"
18) "23"
19) "mux_direction_probe_count"
20) "23"
21) "link_state_probe_count"
22) "1"
23) "peer_link_state_probe_count"
24) "1"
25) "operation_state_probe_count"
26) "1"
27) "peer_operation_state_probe_count"
28)"1"
This data will allow telemetry to check gRPC stats and version of the server and be able to raise alert if needed appropriatley.

Description
gPRC data for telemetry
appropriate logic is added for handling the gRPC stats and RPC's are called and counted as appropriate

Motivation and Context
How Has This Been Tested?
UT and putting the changes on the testbed
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Jan 30, 2023
Update sonic-platform-daemons submodule pointer to include the following:
* 906d198 add data for telemtery enhancement for 'active-active' cable type ([sonic-net#332](sonic-net/sonic-platform-daemons#332))

Signed-off-by: dprital <drorp@nvidia.com>
StormLiangMS pushed a commit that referenced this pull request Feb 4, 2023
Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
This PR adds logic to add the following gRPC relevant telemetry schema fields in the state DB table
MUX_CABLE_INFO

1) "self_link_state"
2) "up"
3) "peer_link_state"
4) "up"
5) "self_oper_state"
6) "up"
7) "peer_oper_state"
8) "up"
9) "server_version"
10) "1.0"
11) "grpc_connection_status"
12) "READY"
13) "self_mux_direction"
14) "active"
15) "peer_mux_direction"
16) "active"
17) "peer_mux_direction_probe_count"
18) "23"
19) "mux_direction_probe_count"
20) "23"
21) "link_state_probe_count"
22) "1"
23) "peer_link_state_probe_count"
24) "1"
25) "operation_state_probe_count"
26) "1"
27) "peer_operation_state_probe_count"
28)"1"
This data will allow telemetry to check gRPC stats and version of the server and be able to raise alert if needed appropriatley.

Description
gPRC data for telemetry
appropriate logic is added for handling the gRPC stats and RPC's are called and counted as appropriate

Motivation and Context
How Has This Been Tested?
UT and putting the changes on the testbed
liat-grozovik pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 14, 2023
Update sonic-platform-daemons submodule pointer to include the following:
* 906d198 add data for telemtery enhancement for 'active-active' cable type ([#332](sonic-net/sonic-platform-daemons#332))

Signed-off-by: dprital <drorp@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.

4 participants