Skip to content

[BUG] Fix is_multi_vrf_peer KeyError for vsonic neighbors#23966

Open
kalash-nexthop wants to merge 1 commit intosonic-net:masterfrom
nexthop-ai:fix-is-multi-vrf-peer-keyerror-vsonic
Open

[BUG] Fix is_multi_vrf_peer KeyError for vsonic neighbors#23966
kalash-nexthop wants to merge 1 commit intosonic-net:masterfrom
nexthop-ai:fix-is-multi-vrf-peer-keyerror-vsonic

Conversation

@kalash-nexthop
Copy link
Copy Markdown
Contributor

@kalash-nexthop kalash-nexthop commented Apr 16, 2026

Description of PR

Fix KeyError: 'is_multi_vrf_peer' in test_bgp_router_id when peers are vsonic VMs. And while at it, fix the same issue in test_bgp_gr_helper too. This key is set only for cEOS peers, and so the tests fail when peers are vSONIC VMs.

Summary:
Fixes # (issue)

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
  • 202511

Approach

What is the motivation for this PR?

The nbrhosts fixture only sets is_multi_vrf_peer for EOS neighbors, not sonic. When test_bgp_router_id.py runs with vsonic peers, nbrhost["is_multi_vrf_peer"] raises a KeyError.

How did you do it?

Use .get("is_multi_vrf_peer", False) which is the same pattern already used in tests/bgp/conftest.py (e.g., node.get('is_multi_vrf_peer', False)).

How did you verify/test it?

Run tests/bgp/test_bgp_router_id.py on a testbed with vsonic neighbors

Any platform specific information?

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

Documentation

Signed-off-by: Kalash Nainwal <kalash@nexthop.ai>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@kalash-nexthop
Copy link
Copy Markdown
Contributor Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld
Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1089850:

✅Stage Test:

  • Job impacted-area-kvmtest-multi-asic-t1 by Elastictest: retried.
  • Job impacted-area-kvmtest-t0-sonic by Elastictest: retried.

Copy link
Copy Markdown
Collaborator

@yxieca yxieca left a comment

Choose a reason for hiding this comment

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

AI agent on behalf of Ying. Reviewed; no issues found.

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