Skip to content

[202605][intfsorch]: Fence new RIF dependencies during interface removal#4747

Draft
Xichen96 wants to merge 20 commits into
sonic-net:202605from
Xichen96:dev/xichenlin/intfsorch-ip2me-vrf-bind-202605
Draft

[202605][intfsorch]: Fence new RIF dependencies during interface removal#4747
Xichen96 wants to merge 20 commits into
sonic-net:202605from
Xichen96:dev/xichenlin/intfsorch-ip2me-vrf-bind-202605

Conversation

@Xichen96

@Xichen96 Xichen96 commented Jul 13, 2026

Copy link
Copy Markdown

What I did

Built a validation-only branch from the current 202605 head containing the complete dependency-ordered backport set.

The stack is:

  1. Merged prerequisite #4758 — retain a VRF bind until batched IP removals drain.
  2. #4746 — fence new local RIF dependencies while interface removal is pending.
  3. #4766 — retain retryable loopback-action updates and ignore invalid action values without blocking other fields.
  4. #4769 — use the local inband RIF/key/refcount for remote-system-port next hops.
  5. #4772 — avoid inserting a missing bulk neighbor during lookup.
  6. #4764 — retain and safely recreate an explicitly rehomed RIF after dependencies drain.
  7. #4770 — retry remote next-hop work until the inband port exists and propagate retry through all callers.

The current 202605 base already includes #4777, the release-branch equivalent of the PR-CI dependency fix. No validation-only copy of the master CI commit is carried in this stack.

Why I did it

These PRs overlap in intfsorch.cpp, neighorch.cpp, and the mock test fixtures. Individual master builds do not prove that their target-branch conflict resolutions preserve every behavior when combined.

The final merge/backport order also matters:

batch 1:
    #4746, #4766, #4769, #4772

batch 2:
    #4764 after #4746 and #4766
    #4770 after #4769 and #4772

This PR validates that exact combined state against 202605, including merged prerequisite #4758. It is not a backport request and must not be merged.

How I verified it

Exact validation result

  • Head: d4b0502ecdac76d56fdf063a633045c0fb0de977
  • Azure PR build: 1171672 — in progress.
  • Required result: applicable build, Test vstest, and TestAsan vstest lanes complete successfully on the exact published head.

Details if related

  • Validation-only: do not merge this PR.
  • The Tested for 202605 branch label remains absent from the six real PRs until this exact stack completes PR CI.
  • After evidence is recorded in each real PR description, this validation PR will be closed.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@Xichen96
Xichen96 force-pushed the dev/xichenlin/intfsorch-ip2me-vrf-bind-202605 branch from 0e2f73f to 4fa0bab Compare July 13, 2026 14:10
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@Xichen96 Xichen96 changed the title [202605][intfsorch][intfmgr]: Install interface IP2Me route in the correct VRF on VRF bind [202605][intfsorch]: Re-home router interface to the correct VRF on a missed-DEL VRF bind Jul 13, 2026
@Xichen96
Xichen96 requested a review from Copilot July 13, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates IntfsOrch::setIntf to handle the missed-DEL VRF-bind race for non-loopback router interfaces by re-homing an already-created RIF into the configured VRF (when the interface has no IPs yet), ensuring the later IP2Me route is programmed into the correct virtual router. It also adds a mock test to cover the non-loopback missed-DEL scenario.

Changes:

  • Re-home an existing non-loopback router interface into the new VRF when a VRF-bind SET arrives without the preceding DEL and no IPs are present.
  • Add a mock test validating RIF remove+recreate behavior for the missed-DEL non-loopback VRF bind scenario and verifying no move occurs once an IP is present.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
orchagent/intfsorch.cpp Adds re-home logic in IntfsOrch::setIntf for missed-DEL VRF bind updates on existing non-loopback interfaces with no IPs.
tests/mock_tests/intfsorch_ut.cpp Adds IntfsOrchVrfUpdateNonLoopback unit test covering non-loopback missed-DEL VRF bind behavior and the “don’t move if IP exists” constraint.

@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).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@Xichen96
Xichen96 requested a review from prsunny July 16, 2026 05:40
@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).

@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).

@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).

@Xichen96
Xichen96 force-pushed the dev/xichenlin/intfsorch-ip2me-vrf-bind-202605 branch from d219d1c to 3cececb Compare July 18, 2026 05:47
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

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

@Xichen96 Xichen96 closed this Jul 22, 2026
@Xichen96 Xichen96 reopened this Jul 22, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

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

@Xichen96 Xichen96 closed this Jul 22, 2026
@Xichen96 Xichen96 reopened this Jul 22, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

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

@Xichen96 Xichen96 closed this Jul 23, 2026
@Xichen96 Xichen96 reopened this Jul 23, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

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

Treat an explicit all-zero MAC as a request to use the switch source MAC while leaving MAC-absent partial SETs unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b6b568a1-5d2a-4309-b1ac-ef21ca155079

Signed-off-by: Xichen96 <lukelin0907@gmail.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@Xichen96

Copy link
Copy Markdown
Author

Retrying CI once: build 1173111 regular and ASAN vstest both failed before pytest when the host preflight command sudo ip link del Vrf1 segfaulted (exit 139) on separate agents; no product test ran.

@Xichen96 Xichen96 closed this Jul 23, 2026
@Xichen96 Xichen96 reopened this Jul 23, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

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

@Xichen96

Copy link
Copy Markdown
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 1173201:

✅Stage TestAsan:

  • Job vstest: retried.

✅Stage Test:

  • Job vstest: retried.
  • Job vstest: retried.

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.

4 participants