Skip to content

[GCU] Validate peer_group_range ip_range are correct#2145

Merged
qiluo-msft merged 3 commits intosonic-net:masterfrom
ghooo:bgp_speaker_validation
May 17, 2022
Merged

[GCU] Validate peer_group_range ip_range are correct#2145
qiluo-msft merged 3 commits intosonic-net:masterfrom
ghooo:bgp_speaker_validation

Conversation

@ghooo
Copy link
Contributor

@ghooo ghooo commented Apr 28, 2022

What I did

Fixes #2119

How I did it

How to verify it

Previous command output (if the output of a command-line utility has changed)

Sorting output:

Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassiveV6"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPVac", "value": {"ip_range": ["192.168.0.0/21"], "name": "BGPVac", "src_address": "10.1.0.32"}}]
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassive"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPSLBPassive", "value": {"ip_range": ["10.255.0.0/25"], "name": "BGPSLBPassive", "src_address": "10.1.0.32"}}]

New command output (if the output of a command-line utility has changed)

Sorting output:

Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassiveV6"}]
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE", "value": {"BGPSLBPassive": {"ip_range": ["10.255.0.0/25"], "name": "BGPSLBPassive", "src_address": "10.1.0.32"}}}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPVac", "value": {"ip_range": ["192.168.0.0/21"], "name": "BGPVac", "src_address": "10.1.0.32"}}]

@wen587
Copy link
Contributor

wen587 commented Apr 29, 2022

Verified no log error.

@wen587 wen587 self-requested a review April 29, 2022 01:29
wen587
wen587 previously approved these changes Apr 29, 2022
Copy link
Contributor

@wen587 wen587 left a comment

Choose a reason for hiding this comment

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

Verified locally.

@qiluo-msft
Copy link
Contributor

Please resolve conflict.
Please add unit test and cover enough lines in this PR.

@ghooo
Copy link
Contributor Author

ghooo commented May 16, 2022

Please resolve conflict. Please add unit test and cover enough lines in this PR.

@wen587 @qiluo-msft updated

Copy link
Contributor

@wen587 wen587 left a comment

Choose a reason for hiding this comment

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

LGTM

@wen587
Copy link
Contributor

wen587 commented May 17, 2022

Hi @ghooo, seems the PR is blocked on coverage check?

@qiluo-msft
Copy link
Contributor

Will override coverage checker. Since it passed actually.
image

@qiluo-msft qiluo-msft merged commit d7953d2 into sonic-net:master May 17, 2022
dprital added a commit to dprital/sonic-buildimage that referenced this pull request May 25, 2022
Update sonic-utilities submodule pointer to include the following:
* [GCU] Handling type1 lists ([sonic-net#2171](sonic-net/sonic-utilities#2171))
* [yang] extend ConfigMgmt constructor to pass YANG options ([sonic-net#2118](sonic-net/sonic-utilities#2118))
* [dump] implement ACL modules ([sonic-net#2153](sonic-net/sonic-utilities#2153))
* show commands for SYSTEM READY ([sonic-net#1851](sonic-net/sonic-utilities#1851))
* [GCU] Handling non-compliant leaf-list with string values ([sonic-net#2174](sonic-net/sonic-utilities#2174))
* Add sonic-delayed.target to Application Extension .timer file generator ([sonic-net#2176](sonic-net/sonic-utilities#2176))
* [portconfig] Allow to configure interface mtu for physical ports ([#l](https://github.com/Azure/sonic-utilities/pull/l))
* Broadcast Unknown-multicast and Unknown-unicast Storm-control  ([sonic-net#928](sonic-net/sonic-utilities#928))
* sonic-utils: initial support for link-training ([sonic-net#2071](sonic-net/sonic-utilities#2071))
* [portchannel] Added ACL/PBH binding checks to the port before getting added to portchannel ([sonic-net#2151](sonic-net/sonic-utilities#2151))
* Modify override testcase to cover PORT admin_status ([sonic-net#2165](sonic-net/sonic-utilities#2165))
* [GCU] Validate peer_group_range ip_range are correct ([sonic-net#2145](sonic-net/sonic-utilities#2145))
* [auto-ts] add memory check ([sonic-net#2116](sonic-net/sonic-utilities#2116))
* support new interface types CR8/SR8/KR8/LR8 which are brougnt by SAI V.1.10.2 ([sonic-net#2167](sonic-net/sonic-utilities#2167))
* [scripts/fast-reboot] Add option to include ssd-upgrader-part boot option with SONiC partition ([sonic-net#2150](sonic-net/sonic-utilities#2150))
* [config reload] Fix invalid rstrip. ([sonic-net#2157](sonic-net/sonic-utilities#2157))
* Accept 0 for queue and dscp ([sonic-net#2162](sonic-net/sonic-utilities#2162))

Signed-off-by: dprital <[email protected]>
yxieca pushed a commit that referenced this pull request Jun 17, 2022
#### What I did

Fixes #2119

#### Previous command output (if the output of a command-line utility has changed)
Sorting output:
```
Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassiveV6"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPVac", "value": {"ip_range": ["192.168.0.0/21"], "name": "BGPVac", "src_address": "10.1.0.32"}}]
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassive"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPSLBPassive", "value": {"ip_range": ["10.255.0.0/25"], "name": "BGPSLBPassive", "src_address": "10.1.0.32"}}]

```
#### New command output (if the output of a command-line utility has changed)

Sorting output:
```
Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassiveV6"}]
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE", "value": {"BGPSLBPassive": {"ip_range": ["10.255.0.0/25"], "name": "BGPSLBPassive", "src_address": "10.1.0.32"}}}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPVac", "value": {"ip_range": ["192.168.0.0/21"], "name": "BGPVac", "src_address": "10.1.0.32"}}]
```
StormLiangMS pushed a commit that referenced this pull request Jan 15, 2026
…t vnets (#4179)

What I did
Skip IP range duplicate check in validate_bgp_peer_group for different vnets
Related issue: #2145

How I did it
Check duplicates only when both vnet_name and ip_range match

How to verify it
testbed tests and unit tests
dhanasekar-arista pushed a commit to dhanasekar-arista/sonic-utilities that referenced this pull request Jan 21, 2026
…t vnets (sonic-net#4179)

What I did
Skip IP range duplicate check in validate_bgp_peer_group for different vnets
Related issue: sonic-net#2145

How I did it
Check duplicates only when both vnet_name and ip_range match

How to verify it
testbed tests and unit tests
mssonicbld added a commit to mssonicbld/sonic-utilities that referenced this pull request Jan 22, 2026
…t vnets

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

    ** Make sure all your commits include a signature generated with `git commit -s` **

    If this is a bug fix, make sure your description includes "closes #xxxx",
    "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
    issue when the PR is merged.

    If you are adding/modifying/removing any command or utility script, please also
    make sure to add/modify/remove any unit tests from the tests
    directory as appropriate.

    If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
    subcommand, or you are adding a new subcommand, please make sure you also
    update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
    your changes.

    Please provide the following information:
-->

#### What I did
Skip IP range duplicate check in `validate_bgp_peer_group` for different vnets
Related issue: sonic-net#2145

#### How I did it
Check duplicates only when both `vnet_name` and `ip_range` match

#### How to verify it
testbed tests and unit tests
mssonicbld added a commit that referenced this pull request Jan 22, 2026
…t vnets (#4215)

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

 failure_prs.log skip_prs.log Make sure all your commits include a signature generated with `git commit -s` **

 If this is a bug fix, make sure your description includes "closes #xxxx",
 "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
 issue when the PR is merged.

 If you are adding/modifying/removing any command or utility script, please also
 make sure to add/modify/remove any unit tests from the tests
 directory as appropriate.

 If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
 subcommand, or you are adding a new subcommand, please make sure you also
 update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
 your changes.

 Please provide the following information:
-->

#### What I did
Skip IP range duplicate check in `validate_bgp_peer_group` for different vnets
Related issue: #2145

#### How I did it
Check duplicates only when both `vnet_name` and `ip_range` match

#### How to verify it
testbed tests and unit tests
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.

[GCU] bgp speaker rollback failure

4 participants