Skip to content

Skip check_bgp_router_id on T2 devices#9090

Merged
kellyyeh merged 3 commits intosonic-net:masterfrom
kellyyeh:router-id-skip
Jul 24, 2023
Merged

Skip check_bgp_router_id on T2 devices#9090
kellyyeh merged 3 commits intosonic-net:masterfrom
kellyyeh:router-id-skip

Conversation

@kellyyeh
Copy link
Copy Markdown
Contributor

@kellyyeh kellyyeh commented Jul 22, 2023

Description of PR

Summary: Skip check_bgp_router_id on T2 devices
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

In chassis the a different Loopback ip is used as bgp router_id

How did you do it?

Skip check_bgp_router_id on t2 topo

How did you verify/test it?

Any platform specific information?

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

Documentation

@kellyyeh kellyyeh requested review from arlakshm and vaibhavhd July 22, 2023 00:09
@mssonicbld
Copy link
Copy Markdown
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.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/plugins/sanity_check/checks.py:235:121: E501 line too long (143 > 120 characters)

check conditional mark sort..........................(no files to check)Skipped

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
Copy Markdown
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 tests/common/plugins/sanity_check/checks.py

fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Failed
- hook id: check-ast
- exit code: 1

tests/common/plugins/sanity_check/checks.py: failed parsing with CPython 3.8.10:

Traceback (most recent call last):
File "/home/AzDevOps/.cache/pre-commit/reponsn9ws2u/py_env-python3/lib/python3.8/site-packages/pre_commit_hooks/check_ast.py", line 21, in main
ast.parse(f.read(), filename=filename)
File "/usr/lib/python3.8/ast.py", line 47, in parse
...
[truncated extra lines, please run pre-commit locally to view full check results]

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
Copy Markdown
Collaborator

@kellyyeh PR conflicts with 202205 branch

@mssonicbld
Copy link
Copy Markdown
Collaborator

@kellyyeh PR conflicts with 202012 branch

@wenyiz2021
Copy link
Copy Markdown
Contributor

@kellyyeh could you open cherrypick PR on 202205 branch? w/o this it is failing chassis single asic card sanity check

@kellyyeh kellyyeh deleted the router-id-skip branch July 31, 2023 17:53
kellyyeh added a commit to kellyyeh/sonic-mgmt that referenced this pull request Jul 31, 2023
kellyyeh added a commit to kellyyeh/sonic-mgmt that referenced this pull request Jul 31, 2023
wangxin pushed a commit that referenced this pull request Aug 1, 2023
This is a cherry-pick PR #9090

What is the motivation for this PR?
In chassis, a different Loopback ip is used as bgp router_id.

How did you do it?
Skip check_bgp_router_id on t2 topo
wangxin pushed a commit that referenced this pull request Aug 1, 2023
This is a cherry-pick PR for #8576 and #9090
* Check if BGP has Loopback0 IP as its router ID (#8576)
* Skip check_bgp_router_id on T2 devices (#9090)

What is the motivation for this PR?
An issue was found that T0 did not announce Loopback to T1, this check is to bridge the test gap to ensure bgp router identifier matches Loopback0 IP.

How did you do it?
Added in sanity_check to match bgp router id and loopback0 ip

How did you verify/test it?
Ran a advanced_reboot manually and checked expected log: BGP router identifier:
https://elastictest.org/scheduler/testplan/649c780c75768730ce0de9f3
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants