Skip to content

[cherry-pick][202605] Add dual-ToR prober and neighbor mode golden config support - #26376

Merged
StormLiangMS merged 3 commits into
sonic-net:202605from
zjswhhh:cherry-pick-20765-25674-202605
Jul 29, 2026
Merged

StormLiangMS merged 3 commits into
sonic-net:202605from
zjswhhh:cherry-pick-20765-25674-202605

Conversation

@zjswhhh

@zjswhhh zjswhhh commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Cherry-pick the following master commits to 202605 to support configuring prober_type and neighbor_mode in dual-ToR golden config generation:

ff59c00 Addition of prober_typer knob of MUX_CABLE as part of golden config (#20765)
2269833 [Dualtor] add support for neighbor mode in golden_config (#25674)

Fixes # (issue): N/A - backport of existing master commits.

Type of change

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

Back port request

  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605

Approach

What is the motivation for this PR?

Allow dual-ToR testbeds on 202605 to select software or hardware probing and host-route or prefix-route neighbor mode through testbed configuration.

How did you do it?

Cherry-picked the two listed master commits in dependency order. The changes pass the testbed values to golden config generation and add them to existing MUX_CABLE entries when explicitly configured.

How did you verify/test it?

  • git diff --check upstream/202605...HEAD
  • python3 -m py_compile ansible/library/generate_golden_config_db.py

Any platform specific information?

The settings apply to dual-ToR topologies. Existing defaults remain unchanged when the knobs are not configured.

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

Not a new test case. The framework changes target dual-ToR topologies.

Documentation

The testbed configuration example is included in ansible/testbed.yaml.

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

@github-actions
github-actions Bot requested review from r12f, sdszhang and wangxin July 20, 2026 19:10
@azure-pipelines

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

@zjswhhh
zjswhhh marked this pull request as draft July 20, 2026 19:10
@zjswhhh
zjswhhh force-pushed the cherry-pick-20765-25674-202605 branch from 9f34e99 to 2349e4d Compare July 20, 2026 19:12
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@zjswhhh
zjswhhh marked this pull request as ready for review July 20, 2026 19:15
@azure-pipelines

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

@zjswhhh
zjswhhh requested a review from vaibhavhd July 20, 2026 19:16
…onic-net#20765)

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit
easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should
reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary:
Prober_type knob was added in MUX_CABLE,now we needed an option to run
mgmt runs with software prober or hardware prober for any run on
dualtor.

How to enable it :
- conf-name: docker-ptf
  group-name: sonic_cisco
  topo: t0
  ptf_image_name: docker-ptf-titan
  **prober_type: hardware**
  ptf: docker-ptf
  ptf_ip: 192.168.122.78/24
  ptf_ipv6: fc0b::1/64
  server: server_1
  vm_base: VM0100
  dut:
  - titan-01
  inv_name: lab
  auto_recover: 'True'
  comment: Test ptf titan

Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [ ] Bug fix
- [X ] 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?
This PR is to add support for prober_type knob enable or disable in
golden_config

#### How did you do it?
added prober_type: <hardware/software> to testbed.yaml
specific config will be added to golden_config_db.json
which will eventaully go to config_db.json using minigraph_override

#### How did you verify/test it?
Ran sanities with this option enabled and then disabled. It was
generating the right golden_config

#### Any platform specific information?
Default value of this prober_type will be software .if nothing is added
in testbed.yaml then no need to add this as default is already software.

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

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->

---------

Signed-off-by: Harjot Singh <harjotpawrawork@gmail.com>
Signed-off-by: harjotsinghpawra <harjotpawrawork@gmail.com>
…5674)

Summary:
neighbor_mode knob was added in MUX_CABLE,now we needed an option to run
mgmt runs with neighbor mode set as host-route or prefix-route for any
run on dualtor.

### Documentation
sonic-net/SONiC#2176

Signed-off-by: Harjot Singh <harjotpawrawork@gmail.com>
Signed-off-by: harjotsinghpawra <harjotpawrawork@gmail.com>
@zjswhhh
zjswhhh force-pushed the cherry-pick-20765-25674-202605 branch from 2349e4d to 9a4f99a Compare July 20, 2026 19:18
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@harjotsinghpawra

Copy link
Copy Markdown
Contributor

LGTM , the test case failures dose not seem related to the changes

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request for branch(es): 202605.
Added label(s) for branch(es) 202605.

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request label(s) for branch(es): 202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202605: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

vaibhavhd
vaibhavhd previously approved these changes Jul 21, 2026
@vaibhavhd

Copy link
Copy Markdown
Contributor

PR tests failing. Please check.

@zjswhhh

zjswhhh commented Jul 21, 2026

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

✅Stage Test:

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

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@github-actions
github-actions Bot requested a review from xwjiang-ms July 22, 2026 17:29
@github-actions

Copy link
Copy Markdown

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

@azure-pipelines

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

Comment thread tests/acl/test_src_mac_rewrite.py Fixed
Comment thread tests/bgp/test_bgp_authentication.py Fixed
… cherry-pick-20765-25674-202605

Signed-off-by: Jing Zhang <zhangjing@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 684f81f0-f270-43fc-b397-2cb895b9ef0f
@zjswhhh
zjswhhh force-pushed the cherry-pick-20765-25674-202605 branch from 124659a to f087e07 Compare July 22, 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).

@zjswhhh

zjswhhh commented Jul 23, 2026

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

✅Stage Test:

  • Job impacted-area-kvmtest-dualtor by Elastictest: retried.

@zjswhhh

zjswhhh commented Jul 23, 2026

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

✅Stage Test:

  • Job impacted-area-kvmtest-dualtor by Elastictest: retried.

@vaibhavhd

Copy link
Copy Markdown
Contributor

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

This seem to be a new requirement now? Unclear to me if I can approve merge to 202605 w/o an approval from tagged members. Deferring cherry pick decision to @StormLiangMS (who also manages sonic-mgmt cherry picks for 202605).

@StormLiangMS

Copy link
Copy Markdown
Collaborator

hi @zjswhhh This seems to be a feature enhancement rather than a bug fix. Could you clarify the justification for cherry-picking it into the 202605 release?

@lolyu could you help to review also?

@StormLiangMS
StormLiangMS merged commit 687aa6d into sonic-net:202605 Jul 29, 2026
26 checks passed
mssonicbld added a commit that referenced this pull request Aug 26, 2026
…eration (#27337)

<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit
easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should
reviewer start? background context?
- List any dependencies that are required for this change.
-->
PR #26376 added dual-ToR golden config generation support for
`prober_type`
 and `neighbor_mode`. As part of that change, dualtor topologies started
generating `golden_config_db.json` with a `PORT` table copied from
minigraph.

The deploy flow already runs `config load_minigraph -y` before golden
config
generation for `lt2` and `ft2`, because those topologies modify/copy
`PORT`
and need the DUT config to reflect testbed-specific interface admin
state
 first. The new dualtor golden config path missed this preload step.

Without the preload, unused routed ports can be preserved as `admin up`
in
`golden_config_db.json`. These ports have no link, remain `oper down`,
and
 pretest interface sanity fails.

 This PR extends the existing preload condition to include dualtor.

Summary:
Fixes #26673
<!--
If you request a backport/cherry-pick below, link the GitHub issue or
ADO work
item here (for example, "Fixes #<issue>" or "ADO: <work item URL>").
-->

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

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


### Back port request
<!--
Only check a release or feature branch when the PR links a GitHub issue
or ADO
work item above. The linked tracker should explain the failure in
detail,
including whether it is a day-one issue or a regression, the affected
branch/image/platform/test, and why this branch needs the fix. Backport
or
cherry-pick requests without a linked issue/work item may not be
favored.

If you request a backport/cherry-pick, provide both:
1. A GitHub issue or Microsoft ADO work item tracking the change.
2. Test evidence from the target branch(es) requested below.
-->
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [ ] 202512
- [x] 202605

Tracking issue/work item for backport/cherry-pick request (GitHub issue
or Microsoft ADO):
Failure type: regression

### Tested branch
<!--
Select each branch where the change was tested. If you request a
backport/cherry-pick, select the base branch and the tested target
release
branch(es).
-->
- [ ] master
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [ ] 202511
- [ ] 202512
- [x] 202605
- [ ] N/A

### Test result
<!--
Provide the tested image version and test evidence for each selected
branch.
For example:
- master: 20260716.01 - <test result or link>
- 202605: 20260531.42 - <test result or link>
-->

202605 

**Failure Results** 
- SONiC image:
branch.202605-ars.e7f59890-buildimage.de4f9f0baae9667c05bfe9fdeb1a4fdf4bd19d6c-nightly-2026.07.28.16.40
 - SONiC build commit: 0a4101e99
 - Build date: Tue Jul 28 21:11:40 UTC 2026

[test_pretest.log](https://github.com/user-attachments/files/30528920/test_pretest.log)

[test_pretest.xml](https://github.com/user-attachments/files/30528921/test_pretest.xml)

**Pass Results (after fix)**
- SONiC image:
branch.202605-ars.e7f59890-buildimage.de4f9f0baae9667c05bfe9fdeb1a4fdf4bd19d6c-nightly-2026.07.28.16.40
 - SONiC build commit: 0a4101e99
 - Build date: Tue Jul 28 21:11:40 UTC 2026

[test_pretest.log](https://github.com/user-attachments/files/30528954/test_pretest.log)

[test_pretest.xml](https://github.com/user-attachments/files/30528955/test_pretest.xml)

sonic-mgmt change under test:
 - PR head commit: f0c462b

Note: Both before and after tests used the same SONiC image/build; the
validated change is in sonic-mgmt.



### Approach
#### What is the motivation for this PR?

Fix a regression introduced when dualtor was added to the golden config
generation path. dualtor golden config now copies `PORT`, so it needs
the
 same minigraph preload step that already exists for `lt2` and `ft2`.

#### How did you do it?

 Updated `ansible/config_sonic_basedon_testbed.yml` so the existing
 `config load_minigraph -y` step runs for dualtor before
 `golden_config_db.json` is generated.

```
 - when: "'lt2' in topo or 'ft2' in topo"
 + when: "'lt2' in topo or 'ft2' in topo or 'dualtor' in topo"
```


#### How did you verify/test it?
<!--
Summarize the overall validation here. For a backport/cherry-pick
request,
provide branch-specific image versions and evidence in the Test result
section.
-->
Inspected failed pretest logs from tst-esx-31. 
All failed during pretest setup sanity with unused routed ports
 left as admin up / oper down. 
Applied the fix and sanitized the duts , ran deploy-mg and pret-tests

#### Any platform specific information?
N/A
#### Supported testbed topology if it's a new test case?
N/A
### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
N/A

Signed-off-by: mssonicbld <sonicbld@microsoft.com>
Co-authored-by: Pratik Dam <pdam@arista.com>
arista-nwolfe added a commit to arista-nwolfe/sonic-mgmt that referenced this pull request Sep 4, 2026
This is another config that is only present in the golden_config_db.json
This config will only be present for dualtor systems
sonic-net#26376

Signed-off-by: Nathan Wolfe <nwolfe@arista.com>
arista-nwolfe added a commit to arista-nwolfe/sonic-mgmt that referenced this pull request Sep 17, 2026
This is another config that is only present in the golden_config_db.json
This config will only be present for dualtor systems
sonic-net#26376

Signed-off-by: Nathan Wolfe <nwolfe@arista.com>
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.

7 participants