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

Fix gnmi cli hang #69

Merged
merged 4 commits into from
Jan 5, 2023
Merged

Conversation

zbud-msft
Copy link
Contributor

Why I did it

gnmi_cli will hang when trying to write to channel inside cli_config. Use one goroutine to write to term channel and check if received cnt == expected cnt, otherwise when sleep_cnt hits max term due to timeout

How I did it

How to verify it

Nightly tests

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

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

Description for the changelog

Link to config_db schema for YANG module changes

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

From: zbud-msft <zainbudhwani@microsoft.com>
Date: Wed, 4 Jan 2023 00:07:04 +0000
Subject: [PATCH] Fix gnmi_cli hang

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add comment to explain your patch

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 last patch by removing writing to channel inside cli_config. Combined fixes into existing patch

Makefile Outdated
@@ -53,6 +53,7 @@ $(GO_DEPS): go.mod $(PATCHES) swsscommon_wrap
patch -d vendor -p0 < patches/gnmi_path.patch
patch -d vendor -p0 < patches/gnmi_xpath.patch
git apply patches/0001-Updated-to-filter-and-write-to-file.patch
git apply patches/0001-Fix-gnmi_cli-hang.patch
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be "0002-...."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Combined into one patch

@zbud-msft zbud-msft merged commit d922a07 into sonic-net:master Jan 5, 2023
qiluo-msft pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jan 6, 2023
#### Why I did it

Submodule update for sonic-gnmi
Incorporates:

d922a07 Zain Budhwani   Wed Jan 4 21:27:32 2023 -0800   Fix gnmi cli hang (sonic-net/sonic-gnmi#69)

#### How I did it

Get latest updates
@zbud-msft zbud-msft deleted the fix-gnmi-cli-hang branch March 1, 2023 18:37
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