Skip to content

[testbed] announce routes with routes generation switch, aggregate routes and variable ipv6 address pattern#15748

Merged
bingwang-ms merged 6 commits intosonic-net:masterfrom
w1nda:setup-routes-when-add-topo
Jan 18, 2025
Merged

[testbed] announce routes with routes generation switch, aggregate routes and variable ipv6 address pattern#15748
bingwang-ms merged 6 commits intosonic-net:masterfrom
w1nda:setup-routes-when-add-topo

Conversation

@w1nda
Copy link
Member

@w1nda w1nda commented Nov 26, 2024

Description of PR

Summary:
In this PR, we added new features to make announce routes script more powerful.

  1. Variable ipv6 address pattern, previously, we are hardcoding ipv6 prefix with pattern 20%02X:%02X%02X:0:%02X::/64, now, it can be set in script or topology file.
  2. Selectable exabgp setting up and routes generation. now we can add flag in topology file to enable ipv4 or ipv6, or disable ipv4 or ipv6.
  3. Aggregated routes on peers. At the VM definition in topology file, we now support define aggregate route on the VM.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

To make route announcement more powerful.

How did you do it?

Add routes generation switch, aggregate routes and variable ipv6 address pattern

How did you verify/test it?

Verified on 7215 testbed with t0 and t1 topologies.

Any platform specific information?

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

Documentation

@w1nda w1nda requested review from Blueve and r12f November 26, 2024 12:20
@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing ansible/roles/vm_set/tasks/announce_routes.yml

fix end of files.........................................................Passed
check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Passed
flake8...............................................(no files to check)Skipped
check conditional mark sort..............................................Passed

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

1 similar comment
@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing ansible/roles/vm_set/tasks/announce_routes.yml

fix end of files.........................................................Passed
check yaml...............................................................Passed
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Passed
flake8...............................................(no files to check)Skipped
check conditional mark sort..............................................Passed

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202412: Azure/sonic-mgmt.msft#28

nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
…utes and variable ipv6 address pattern (sonic-net#15748)

* add routes generation switch, add aggregate routes key, paramterize ipv6 address prefix length
mssonicbld added a commit to mssonicbld/sonic-mgmt.msft that referenced this pull request May 9, 2025
<!--
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 test plan is to test if control/data plane can handle the initialization/flapping of numerous BGP session holding a lot routes, and estimate the impact on it.

Related PRs:
| PR title | State | Context |
| ------ | ------ | -------|
| [ [bgp-scale-test] Implement bgp scale test cases for sessions flapping, unisolation, nexthop group member change scenarios ](sonic-net/sonic-mgmt#16069) | ![state](https://img.shields.io/github/pulls/detail/state/sonic-net/sonic-mgmt/16069) | ![context](https://img.shields.io/github/status/contexts/pulls/sonic-net/sonic-mgmt/16069) |
| [ [testbed] announce routes with routes generation switch, aggregate routes and variable ipv6 address pattern ](sonic-net/sonic-mgmt#15748) | ![state](https://img.shields.io/github/pulls/detail/state/sonic-net/sonic-mgmt/15748) | ![context](https://img.shields.io/github/status/contexts/pulls/sonic-net/sonic-mgmt/15748) |
| [ [isolated-topo] disable ipv4 routes generation, add mocked aggregated addresses ](sonic-net/sonic-mgmt#15748) | ![state](https://img.shields.io/github/pulls/detail/state/sonic-net/sonic-mgmt/16213) | ![context](https://img.shields.io/github/status/contexts/pulls/sonic-net/sonic-mgmt/16213) |

### Type of change

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

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

### Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405

### Approach
#### What is the motivation for this PR?
With numerous BGP sessions holding a lot routes, any flapping on BGP sessions or routes cloud have more overhead on device, to verify the functionality and estimate convergence time, we publish this test plan.
#### How did you do it?
Describe three test scenarios and introduce how we measure time in test.
#### How did you verify/test it?

#### Any platform specific information?

#### 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?
-->
mssonicbld added a commit to Azure/sonic-mgmt.msft that referenced this pull request May 9, 2025
<!--
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 test plan is to test if control/data plane can handle the initialization/flapping of numerous BGP session holding a lot routes, and estimate the impact on it.

Related PRs:
| PR title | State | Context |
| ------ | ------ | -------|
| [ [bgp-scale-test] Implement bgp scale test cases for sessions flapping, unisolation, nexthop group member change scenarios ](sonic-net/sonic-mgmt#16069) | ![state](https://img.shields.io/github/pulls/detail/state/sonic-net/sonic-mgmt/16069) | ![context](https://img.shields.io/github/status/contexts/pulls/sonic-net/sonic-mgmt/16069) |
| [ [testbed] announce routes with routes generation switch, aggregate routes and variable ipv6 address pattern ](sonic-net/sonic-mgmt#15748) | ![state](https://img.shields.io/github/pulls/detail/state/sonic-net/sonic-mgmt/15748) | ![context](https://img.shields.io/github/status/contexts/pulls/sonic-net/sonic-mgmt/15748) |
| [ [isolated-topo] disable ipv4 routes generation, add mocked aggregated addresses ](sonic-net/sonic-mgmt#15748) | ![state](https://img.shields.io/github/pulls/detail/state/sonic-net/sonic-mgmt/16213) | ![context](https://img.shields.io/github/status/contexts/pulls/sonic-net/sonic-mgmt/16213) |

### Type of change

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

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

### Back port request
- [ ] 202012
- [ ] 202205
- [ ] 202305
- [ ] 202311
- [ ] 202405

### Approach
#### What is the motivation for this PR?
With numerous BGP sessions holding a lot routes, any flapping on BGP sessions or routes cloud have more overhead on device, to verify the functionality and estimate convergence time, we publish this test plan.
#### How did you do it?
Describe three test scenarios and introduce how we measure time in test.
#### How did you verify/test it?

#### Any platform specific information?

#### 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?
-->
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