Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance restore_bgp_suppress_fib to check status first #10612

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

StormLiangMS
Copy link
Collaborator

@StormLiangMS StormLiangMS commented Nov 2, 2023

Description of PR

Summary:
Fixes # (issue)
ADO: 25564723

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

In current test, it will set the bgp suppress to disabled no matter what's the value in the config_db. If it is enabled before the test, it should honor it, and don't change it after the test.
In this PR, will add a check logic to restore only it is needed.

How did you do it?

To read back the config db before test, then do the restore when it is needed.

How did you verify/test it?

  1. enable the fib suppress.
  2. run bgp suppress fib test.
  3. check the config, if it is same as before.

Any platform specific information?

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

Documentation

@StormLiangMS StormLiangMS requested a review from jcaiMR as a code owner November 2, 2023 07:55
@StormLiangMS StormLiangMS marked this pull request as draft November 2, 2023 07:55
@StormLiangMS StormLiangMS marked this pull request as ready for review November 2, 2023 14:40
StormLiangMS added a commit to sonic-net/sonic-buildimage that referenced this pull request Nov 3, 2023
Why I did it
Enable the suppress fib feature by default.

Work item tracking
Microsoft ADO (25564723):
How I did it
In minigraph.py, to add the field suppress-fib-pending, and enable it for leafrouter.

How to verify it
Build / load image and check the config_db by show CLI.
admin@str-7260cx3-acs-2:~$ show suppress-fib-pending
Enabled

Need to modify the tests/bgp/test_bgp_suppress_fib.py in sonic-mgmt repo, to check the config before restore. Otherwise, after this test, it will turn off the suppress-fib-pending.
sonic-net/sonic-mgmt#10612
@StormLiangMS StormLiangMS merged commit 3a55517 into sonic-net:master Nov 3, 2023
12 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Nov 3, 2023
What is the motivation for this PR?
In current test, it will set the bgp suppress to disabled no matter what's the value in the config_db. If it is enabled before the test, it should honor it, and don't change it after the test.
In this PR, will add a check logic to restore only it is needed.

How did you do it?
To read back the config db before test, then do the restore when it is needed.

How did you verify/test it?
enable the fib suppress.
run bgp suppress fib test.
check the config, if it is same as before.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #10624

mssonicbld pushed a commit that referenced this pull request Nov 3, 2023
What is the motivation for this PR?
In current test, it will set the bgp suppress to disabled no matter what's the value in the config_db. If it is enabled before the test, it should honor it, and don't change it after the test.
In this PR, will add a check logic to restore only it is needed.

How did you do it?
To read back the config db before test, then do the restore when it is needed.

How did you verify/test it?
enable the fib suppress.
run bgp suppress fib test.
check the config, if it is same as before.
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.

3 participants