Skip to content

Improve robustness of test_bgp_allow_list#3488

Merged
wangxin merged 2 commits intosonic-net:masterfrom
wangxin:bgp-allowlist-robustness
May 20, 2021
Merged

Improve robustness of test_bgp_allow_list#3488
wangxin merged 2 commits intosonic-net:masterfrom
wangxin:bgp-allowlist-robustness

Conversation

@wangxin
Copy link
Collaborator

@wangxin wangxin commented May 17, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

BGP monitor is configured during BGP allow list and BGP monitor testing. The BGP
monitor configuration includes adding new IP to PTF and DUT. In case the test script
failed unexpectedly, the IP addresses added to PTF and DUT may not be cleaned.
Then subsequent execution of BGP monitor and allow list may fail because of conflicting
configurations on PTF and DUT.

How did you do it?

Changes to improve the robustness:

  • Before configure BGP monitor, always try to cleanup possible conflicting IP address
    configurations on PTF and DUT.
  • Replace fixed sleep with wait_until during check BGP monitor dumps.
  • Return list of routes not found in BGP monitor, not just a boolean value.
  • Added methods "change_mac_addresses" and "remove_ip_addresses" to class PTFHost.
  • Updated fixtures in ptfhost_utils.py to use the new PTFHost methods.

How did you verify/test it?

Any platform specific information?

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

Documentation

BGP monitor is configured during BGP allow list and BGP monitor testing. The BGP
monitor configuration includes adding new IP to PTF and DUT. In case the test script
failed unexpectedly, the IP addresses added to PTF and DUT may not be cleaned.
Then subsequent execution of BGP monitor and allow list may fail because of conflicting
configurations on PTF and DUT.

Changes to improve the robustness:
* Before configure BGP monitor, always try to cleanup possible conflicting IP address
  configurations on PTF and DUT.
* Replace fixed sleep with wait_until during check BGP monitor dumps.
* Return list of routes not found in BGP monitor, not just a boolean value.
* Added methods "change_mac_addresses" and "remove_ip_addresses" to class PTFHost.
* Updated fixtures in ptfhost_utils.py to use the new PTFHost methods.

Signed-off-by: Xin Wang <[email protected]>
@wangxin wangxin requested review from abdosi and lolyu May 17, 2021 08:38
@wangxin wangxin requested a review from a team as a code owner May 17, 2021 08:38
Copy link
Collaborator

@lolyu lolyu left a comment

Choose a reason for hiding this comment

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

lgtm

@wangxin
Copy link
Collaborator Author

wangxin commented May 19, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wangxin wangxin merged commit 82bbe4e into sonic-net:master May 20, 2021
@wangxin wangxin deleted the bgp-allowlist-robustness branch September 9, 2021 08:08
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
BGP monitor is configured during BGP allow list and BGP monitor testing. The BGP
monitor configuration includes adding new IP to PTF and DUT. In case the test script
failed unexpectedly, the IP addresses added to PTF and DUT may not be cleaned.
Then subsequent execution of BGP monitor and allow list may fail because of conflicting
configurations on PTF and DUT.

Changes to improve the robustness:
* Before configure BGP monitor, always try to cleanup possible conflicting IP address
  configurations on PTF and DUT.
* Replace fixed sleep with wait_until during check BGP monitor dumps.
* Return list of routes not found in BGP monitor, not just a boolean value.
* Added methods "change_mac_addresses" and "remove_ip_addresses" to class PTFHost.
* Updated fixtures in ptfhost_utils.py to use the new PTFHost methods.

Signed-off-by: Xin Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants