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

Return GNMI API error when ZMQ operation failed. #270

Merged
merged 5 commits into from
Jul 15, 2024

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Jul 12, 2024

Return GNMI API error when ZMQ operation failed.

Why I did it

When ZMQ is full, GNMI service crash.

How I did it

Return API error instead of panic.

How to verify it

Manually test.

Work item tracking

Microsoft ADO (number only): 28694022

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Return GNMI API error when ZMQ operation failed.

Link to config_db schema for YANG module changes

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

@liuh-80 liuh-80 marked this pull request as ready for review July 12, 2024 08:10
@liuh-80 liuh-80 requested a review from ganglyu July 12, 2024 08:11
}

return
return err
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the error?

Copy link
Contributor Author

@liuh-80 liuh-80 Jul 12, 2024

Choose a reason for hiding this comment

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

There will be different kinds of error:

Connection break:
"zmq connection break, endpoint: " + m_endpoint + ", error: " + to_string(rc)

Send message failed:
"zmq send failed, endpoint: " + m_endpoint + ", error: " + to_string(rc)

@liuh-80 liuh-80 force-pushed the dev/liuh/return-err-when-zmq-failed branch from 652f2e5 to df04cb0 Compare July 12, 2024 09:12
@liuh-80 liuh-80 merged commit ccce9a2 into sonic-net:master Jul 15, 2024
5 checks passed
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.

2 participants