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

Enable GRPC log for GNMI #20798

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

ganglyu
Copy link
Contributor

@ganglyu ganglyu commented Nov 14, 2024

Why I did it

Currently, we don't have GRPC logs for the GNMI server, making it difficult to debug GRPC-level issues such as invalid certificates.

Work item tracking
  • Microsoft ADO 30230322:

How I did it

Update gnmi-native.sh to enable GRPC_GO_LOG.

How to verify it

Send gnmi request and check gnmi log, for example:
2024 Nov 13 07:35:03.454423 str3 INFO gnmi#supervisord: gnmi-native WARNING: 2024/11/13 07:35:03 [core] grpc: Server.Serve failed to complete security handshake from "127.0.0.1:43530": tls: failed to verify client certificate: x509: certificate signed by unknown authority

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@ganglyu ganglyu requested a review from lguohan as a code owner November 14, 2024 05:26
@ganglyu ganglyu requested review from qiluo-msft and zbud-msft and removed request for lguohan November 14, 2024 05:27
@ganglyu
Copy link
Contributor Author

ganglyu commented Nov 14, 2024

/azpw ms_conflict

@@ -17,6 +17,10 @@ X509=$(echo $TELEMETRY_VARS | jq -r '.x509')
GNMI=$(echo $TELEMETRY_VARS | jq -r '.gnmi')
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also make change in dockers/docker-sonic-telemetry/telemetry.sh?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, will create task for you

@ganglyu
Copy link
Contributor Author

ganglyu commented Nov 14, 2024

/azpw ms_conflict

3 similar comments
@ganglyu
Copy link
Contributor Author

ganglyu commented Nov 15, 2024

/azpw ms_conflict

@ganglyu
Copy link
Contributor Author

ganglyu commented Nov 15, 2024

/azpw ms_conflict

@ganglyu
Copy link
Contributor Author

ganglyu commented Nov 18, 2024

/azpw ms_conflict

@qiluo-msft qiluo-msft merged commit 59f39d4 into sonic-net:master Nov 19, 2024
22 checks passed
github-actions bot pushed a commit to bradh352/sonic-buildimage that referenced this pull request Nov 19, 2024
#### Why I did it
Currently, we don't have GRPC logs for the GNMI server, making it difficult to debug GRPC-level issues such as invalid certificates.

#### How I did it
Update gnmi-native.sh to enable GRPC_GO_LOG.

#### How to verify it
Send gnmi request and check gnmi log, for example:
2024 Nov 13 07:35:03.454423 str3 INFO gnmi#supervisord: gnmi-native WARNING: 2024/11/13 07:35:03 [core] grpc: Server.Serve failed to complete security handshake from "127.0.0.1:43530": tls: failed to verify client certificate: x509: certificate signed by unknown authority
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants