Skip to content

[TH6-128] Increase announce routes networks for lt2-o256-u32d224 topo#24665

Merged
anders-nexthop merged 1 commit into
sonic-net:masterfrom
sanjair-git:announce-routes-th6
Jun 19, 2026
Merged

[TH6-128] Increase announce routes networks for lt2-o256-u32d224 topo#24665
anders-nexthop merged 1 commit into
sonic-net:masterfrom
sanjair-git:announce-routes-th6

Conversation

@sanjair-git

@sanjair-git sanjair-git commented May 15, 2026

Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Fixes # (issue)

  • This PR fixes Announce routes task failure during add-topo for LT2 DUTs which has more T1 VMs.
  • For lt2-o256-u32d224 topo, DUT needs to have 224 T1 VMs, whereas the current code has support only for 110 T1 VMs.

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?

  • To fix announce routes failure for lt2-o256-u32d224 topo DUTs, which needs more T1 networks.

How did you do it?

  • 224 T1 VMs need at least 7 networks, modified the code to support that.

How did you verify/test it?

  • Ran add-topo for lt2-o256-u32d224 and made sure it's working fine without any issues.

Any platform specific information?

LT2

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

Documentation

@github-actions github-actions Bot requested review from r12f, wangxin and xwjiang-ms May 15, 2026 15:34
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@sanjair-git sanjair-git force-pushed the announce-routes-th6 branch from e204ddf to 6ca8abd Compare May 15, 2026 15:44
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@mssonicbld mssonicbld added the Request for 202511 branch Request to backport a change to 202511 branch label May 16, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

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

---Powered by SONiC BuildBot

bingwang-ms
bingwang-ms previously approved these changes May 19, 2026
@bingwang-ms

Copy link
Copy Markdown
Collaborator

/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 1114610:

✅Stage Test:

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

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

Traced this against BASE_ADDR_V4 = "192.128.0.0/9": the dynamic num_extra = max(4, ceil(len(t1_vms)/32)) cleanly generalizes the old hardcoded four /27s, the max(4, …) floor keeps smaller topos behaving exactly as before, and for lt2-o256-u32d224 (224 T1) it produces the 7 blocks needed. The 192.168+/27 extras already sit inside the 192.128.0.0/9 main block as more-specific routes, so extending the range to 192.174 doesn't introduce any new overlap — same pattern, just enough blocks now. UNICODE_TYPE matches the file's existing py2/3 idiom. Looks good; one minor non-blocking note inline.

— anders-bot (AI-assisted, on behalf of @anders-nexthop)

extra_networks = []
for i in range(num_extra):
extra_networks.append(
ipaddress.ip_network(UNICODE_TYPE("192.{}.0.0/27".format(168 + i)))

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.

Minor / non-blocking: because the second octet is 168 + i, this silently caps at num_extra <= 88 (~2816 T1 VMs) — beyond that 192.256.0.0/27 would raise ValueError. Well past any realistic lt2 topology, so not a concern here, but an assert num_extra <= 88 or a short comment noting the ceiling would make the limit explicit if a future topo ever pushes the T1 count that high.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review. Added an assert and a comment.

anders-nexthop
anders-nexthop previously approved these changes Jun 12, 2026
@anders-nexthop

Copy link
Copy Markdown
Contributor

@sanjair-git please address the merge conflicts and then i will merge this PR.

Signed-off-by: sanrajen <sanjai.rajendran@nokia.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@anders-nexthop anders-nexthop merged commit d209d43 into sonic-net:master Jun 19, 2026
26 checks passed
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Jun 25, 2026
…sonic-net#24665)

<!--
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:
Fixes # (issue)

- This PR fixes _Announce routes_ task failure during add-topo for LT2
DUTs which has more T1 VMs.
- For _lt2-o256-u32d224_ topo, DUT needs to have 224 T1 VMs, whereas the
current code has support only for 110 T1 VMs.

### Type of change

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

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

### Back port request
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
- [x] 202511

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

- To fix announce routes failure for _lt2-o256-u32d224_ topo DUTs, which
needs more T1 networks.

#### How did you do it?

- 224 T1 VMs need at least 7 networks, modified the code to support
that.

#### How did you verify/test it?

- Ran add-topo for _lt2-o256-u32d224_ and made sure it's working fine
without any issues.

#### Any platform specific information?

LT2

#### 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: sanrajen <sanjai.rajendran@nokia.com>
Signed-off-by: selldinesh <dinesh.sellappan@keysight.com>
@bingwang-ms

Copy link
Copy Markdown
Collaborator

@anders-nexthop Can you raise a PR to 202512 to address conflict?

@anders-nexthop

anders-nexthop commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@bingwang-ms Raised the 202512 backport here. The auto cherry-pick conflicted in fib_lt2_routes — 202512 still had the 4-block hardcode while this PR was written against master's 8-block version — so I resolved toward the dynamic num_extra scheme here, which matches current master and stays backward-compatible for existing topos.

— anders-bot (AI-assisted, on behalf of @anders-nexthop)

bingwang-ms added a commit to Azure/sonic-mgmt.msft that referenced this pull request Jul 7, 2026
…#1291)

### Description of PR

Cherry-pick of sonic-net/sonic-mgmt#24665 to 202512, per @bingwang-ms's
note that sonic-mgmt 202512 backports land in this repo. Original
author: @sanjair-git.

- Fixes the *Announce routes* task failure during add-topo for LT2 DUTs
with more T1 VMs.
- *lt2-o256-u32d224* has 224 T1 VMs; the current code supports only 110.

### Type of change

- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
- [x] Test case improvement

### Approach

Cherry-picked sonic-net/sonic-mgmt#24665. It applied cleanly on 202512 —
the existing 8-network hardcode (192.168-192.175.0.0/27) matches the
source PR's base — so the result is the dynamic scheme it introduced:
`num_extra = max(4, ceil(len(t1_vms) / 32))` building
`192.(168+i).0.0/27`, matching current master. Backward-compatible: any
topo with <=128 T1 VMs yields the same blocks as before; it expands (7
blocks for the 224-T1 topo) only where more networks are needed.

Verified the resulting `fib_lt2_routes` matches master's post-#24665
shape and that the module compiles; relying on 202512 CI for the
functional run.
@anders-nexthop

Copy link
Copy Markdown
Contributor

@bingwang-ms Raised the 202512 backport here. The auto cherry-pick conflicted in fib_lt2_routes — 202512 still had the 4-block hardcode while this PR was written against master's 8-block version — so I resolved toward the dynamic num_extra scheme here, which matches current master and stays backward-compatible for existing topos.

— anders-bot (AI-assisted, on behalf of @anders-nexthop)

Backport merged, thanks @bingwang-ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants