Skip to content

Parameterize gNMI CONFIG DB tests with different VRFs#20456

Open
spandan-nexthop wants to merge 1 commit into
sonic-net:masterfrom
spandan-nexthop:spandan-nexthop.vrf-aware-gnmi
Open

Parameterize gNMI CONFIG DB tests with different VRFs#20456
spandan-nexthop wants to merge 1 commit into
sonic-net:masterfrom
spandan-nexthop:spandan-nexthop.vrf-aware-gnmi

Conversation

@spandan-nexthop

@spandan-nexthop spandan-nexthop commented Sep 1, 2025

Copy link
Copy Markdown

Description of PR

Parameterize gNMI CONFIG DB tests with different VRFs to ensure correct VRF binding of gNMI listener

Summary:
Fixes sonic-net/sonic-gnmi#504
Depends on:

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

To test the changes in sonic-net/sonic-gnmi#503 and sonic-net/sonic-buildimage#23867

How did you do it?

Parameterized test_gnmi_configdb.py with default, mgmt_vrf and a custom VRF scenario.

How did you verify/test it?

Manual verification of relevant changes are already done with the sonic-buildimage changes.
The updated tests ran successfully in local setup.

Any platform specific information?

NA

Supported testbed topology if it's a new test case?

Any testbed works for the default and mvrf test cases.
Custom non-mgmt VRF testcase requires a t0 topology for now, but it is not a realistic case anyway since the gNMI request is shoved through a dataplane VRF.

Documentation

NA

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

samoyed

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@spandan-nexthop spandan-nexthop marked this pull request as ready for review September 1, 2025 22:16
@spandan-nexthop spandan-nexthop requested review from a team, wangxin and yxieca as code owners September 1, 2025 22:16
@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from 645f3ac to be3a2b2 Compare September 1, 2025 22:27
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@anders-nexthop

Copy link
Copy Markdown
Contributor

@qiluo-msft @sneelam20 @anand-kumar-subramanian @seiferteric

Adding sonic-gnmi maintainers for viz

@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from be3a2b2 to 8eb37b5 Compare November 28, 2025 00:35
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@github-actions github-actions Bot requested a review from nikamirrr November 28, 2025 00:35
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from 8eb37b5 to 9bf6f80 Compare March 25, 2026 22:45
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from 9bf6f80 to 0364fe0 Compare March 25, 2026 22:53
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ronan-nexthop

Copy link
Copy Markdown
Contributor

@qiluo-msft @hdwhdw @sneelam20 @anand-kumar-subramanian @seiferteric can we get a look at this as we are targeting the 202605 release and it is coming up.

Comment thread tests/gnmi/test_gnmi_configdb.py Fixed
Comment thread tests/gnmi/vrf_aware_tests/test_gnmi_configdb.py Fixed
Comment thread tests/gnmi/vrf_aware_tests/test_gnmi_configdb.py Fixed
Comment thread tests/gnmi/vrf_aware_tests/test_gnmi_configdb.py Fixed
Comment thread tests/gnmi/vrf_aware_tests/test_gnmi_configdb.py Fixed
Comment thread tests/gnmi/vrf_aware_tests/test_gnmi_configdb.py Fixed
@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1124996:

✅Stage Test:

  • Job impacted-area-kvmtest-t1-lag by Elastictest: retried.
  • Job impacted-area-kvmtest-t0 by Elastictest: retried.

@bhouse-nexthop

Copy link
Copy Markdown
Contributor

Hi @spandan-nexthop, this PR currently has merge conflicts with the target branch. Could you confirm whether it's still relevant/active? If so, please rebase and resolve the conflicts, and we'll review it. Thanks!

@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from a755b0c to d995e1a Compare June 12, 2026 00:17
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@spandan-nexthop

Copy link
Copy Markdown
Author

/azpw retry

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1136469:

✅Stage Test:

  • Job Get impacted area: retried.

bhouse-nexthop pushed a commit to sonic-net/sonic-utilities that referenced this pull request Jun 15, 2026
#### What I did
Restarting gNMI and Telemetry services if the VRF is changed via GCU.

Fixes: sonic-net/sonic-gnmi#504
Related PRs:
- sonic-net/sonic-gnmi#503
- sonic-net/sonic-buildimage#23867
- sonic-net/sonic-mgmt#20456

#### How I did it
This change adds gnmi and telemetry validators to check for a change in VRF and restarts the services accordingly.

#### How to verify it
Added gNMI and Telemetry service validator tests have been passing.

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)


Signed-off-by: Spandan Chowdhury <spandan@nexthop.ai>
@bhouse-nexthop

Copy link
Copy Markdown
Contributor

Hi @spandan-nexthop, CI is failing on this PR (it ran on the current commit), so a re-run won't help — could you take a look at the failures and fix them? Once CI is green we'll proceed with review. Thanks!

@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from d995e1a to a9cb184 Compare June 16, 2026 21:40
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@github-actions

Copy link
Copy Markdown

@StormLiangMS @wangxin @yxieca A user wants to merge changes to the conditional mark files into master. Please review.

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

@hdwhdw hdwhdw self-requested a review June 18, 2026 03:37
Comment thread tests/gnmi/vrf_aware_tests/conftest.py Outdated
@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from a9cb184 to 8d2a4d1 Compare June 18, 2026 22:59
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@github-actions github-actions Bot requested a review from lolyu June 18, 2026 22:59
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from 8d2a4d1 to e0f569b Compare June 18, 2026 23:01
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

…ct VRF binding of gNMI listener

Signed-off-by: Spandan Chowdhury <spandan@nexthop.ai>
@spandan-nexthop spandan-nexthop force-pushed the spandan-nexthop.vrf-aware-gnmi branch from e0f569b to ce8c53b Compare June 19, 2026 17:41
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@spandan-nexthop spandan-nexthop requested a review from hdwhdw June 19, 2026 20:48
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.

Enhancement: Enable VRF binding for gNMI and Telemetry

7 participants