Skip to content

Wait BGP sessions after changing mgmt IP#15936

Merged
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:wait_bgp_up_in_mgmt_ipv6_change
Dec 6, 2024
Merged

Wait BGP sessions after changing mgmt IP#15936
bingwang-ms merged 1 commit intosonic-net:masterfrom
bingwang-ms:wait_bgp_up_in_mgmt_ipv6_change

Conversation

@bingwang-ms
Copy link
Copy Markdown
Collaborator

Description of PR

Summary:
This PR is to add another fix BGP not established issue in test test_bgp_facts_ipv6_only.
The fix submitted earlier in #15570 didn't address the issue completely as an Exception is thrown from config_reload fixture, which breaks the wait and check.

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?

This PR is to add another fix BGP not established issue in test test_bgp_facts_ipv6_only.

How did you do it?

Add a function to wait BGP sessions up.

How did you verify/test it?

The change is verified on a physical testbed.

collected 1 item                                                                                                                                                                                      

ip/test_mgmt_ipv6_only.py::test_bgp_facts_ipv6_only[bjw2-can-4600c-5-None] 
------------------------------------------------------------------------------------------- live log setup --------------------------------------------------------------------------------------------
21:34:57 duthost_utils.convert_and_restore_config L0762 WARNING| Exception after config reload: Host unreachable
PASSED

Any platform specific information?

No.

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

Not a new test case.

Documentation

@bingwang-ms
Copy link
Copy Markdown
Collaborator Author

@yejianquan Can you help review?

Copy link
Copy Markdown
Contributor

@sdszhang sdszhang left a comment

Choose a reason for hiding this comment

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

LGTM

@bingwang-ms bingwang-ms merged commit 73b7467 into sonic-net:master Dec 6, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Dec 6, 2024
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #15937

yejianquan added a commit that referenced this pull request Feb 14, 2025
Description of PR
Summary:
Fixes #16436, caused by added BGP check in #15936, which doesn't account for T2 BGP time to come up

Approach
What is the motivation for this PR?
Function wait_bgp_sessions timeout is too short for T2, fails in test_mgmt_ipv6_only test suite causing a fixture to error wrongly and not teardown properly leaving TB in bad state without ipv4 mgmt ip

How did you do it?
Increase timeout to 900s from 120s if duthost it is checking is supervisor

How did you verify/test it?
Run locally on T2

See for passing test:

17/01/2025 07:34:39 utilities.wait_until                     L0153 DEBUG  | check_bgp_session_state_all_asics is False, wait 10 seconds and check again
17/01/2025 07:34:49 utilities.wait_until                     L0135 DEBUG  | Time elapsed: 164.073392 seconds
Confirming it needs more than 120 seconds

Signed-off-by: Javier Tan [email protected]
Co-authored-by: Jianquan Ye <[email protected]>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Feb 14, 2025
Description of PR
Summary:
Fixes sonic-net#16436, caused by added BGP check in sonic-net#15936, which doesn't account for T2 BGP time to come up

Approach
What is the motivation for this PR?
Function wait_bgp_sessions timeout is too short for T2, fails in test_mgmt_ipv6_only test suite causing a fixture to error wrongly and not teardown properly leaving TB in bad state without ipv4 mgmt ip

How did you do it?
Increase timeout to 900s from 120s if duthost it is checking is supervisor

How did you verify/test it?
Run locally on T2

See for passing test:

17/01/2025 07:34:39 utilities.wait_until                     L0153 DEBUG  | check_bgp_session_state_all_asics is False, wait 10 seconds and check again
17/01/2025 07:34:49 utilities.wait_until                     L0135 DEBUG  | Time elapsed: 164.073392 seconds
Confirming it needs more than 120 seconds

Signed-off-by: Javier Tan [email protected]
Co-authored-by: Jianquan Ye <[email protected]>
mssonicbld pushed a commit that referenced this pull request Feb 14, 2025
Description of PR
Summary:
Fixes #16436, caused by added BGP check in #15936, which doesn't account for T2 BGP time to come up

Approach
What is the motivation for this PR?
Function wait_bgp_sessions timeout is too short for T2, fails in test_mgmt_ipv6_only test suite causing a fixture to error wrongly and not teardown properly leaving TB in bad state without ipv4 mgmt ip

How did you do it?
Increase timeout to 900s from 120s if duthost it is checking is supervisor

How did you verify/test it?
Run locally on T2

See for passing test:

17/01/2025 07:34:39 utilities.wait_until                     L0153 DEBUG  | check_bgp_session_state_all_asics is False, wait 10 seconds and check again
17/01/2025 07:34:49 utilities.wait_until                     L0135 DEBUG  | Time elapsed: 164.073392 seconds
Confirming it needs more than 120 seconds

Signed-off-by: Javier Tan [email protected]
Co-authored-by: Jianquan Ye <[email protected]>
wangxin pushed a commit to wangxin/sonic-mgmt that referenced this pull request Feb 21, 2025
Description of PR
Summary:
Fixes sonic-net#16436, caused by added BGP check in sonic-net#15936, which doesn't account for T2 BGP time to come up

Approach
What is the motivation for this PR?
Function wait_bgp_sessions timeout is too short for T2, fails in test_mgmt_ipv6_only test suite causing a fixture to error wrongly and not teardown properly leaving TB in bad state without ipv4 mgmt ip

How did you do it?
Increase timeout to 900s from 120s if duthost it is checking is supervisor

How did you verify/test it?
Run locally on T2

See for passing test:

17/01/2025 07:34:39 utilities.wait_until                     L0153 DEBUG  | check_bgp_session_state_all_asics is False, wait 10 seconds and check again
17/01/2025 07:34:49 utilities.wait_until                     L0135 DEBUG  | Time elapsed: 164.073392 seconds
Confirming it needs more than 120 seconds

Signed-off-by: Javier Tan [email protected]
Co-authored-by: Jianquan Ye <[email protected]>
wangxin pushed a commit to wangxin/sonic-mgmt that referenced this pull request Feb 21, 2025
Description of PR
Summary:
Fixes sonic-net#16436, caused by added BGP check in sonic-net#15936, which doesn't account for T2 BGP time to come up

Approach
What is the motivation for this PR?
Function wait_bgp_sessions timeout is too short for T2, fails in test_mgmt_ipv6_only test suite causing a fixture to error wrongly and not teardown properly leaving TB in bad state without ipv4 mgmt ip

How did you do it?
Increase timeout to 900s from 120s if duthost it is checking is supervisor

How did you verify/test it?
Run locally on T2

See for passing test:

17/01/2025 07:34:39 utilities.wait_until L0153 DEBUG | check_bgp_session_state_all_asics is False, wait 10 seconds and check again
17/01/2025 07:34:49 utilities.wait_until L0135 DEBUG | Time elapsed: 164.073392 seconds
Confirming it needs more than 120 seconds

Signed-off-by: Javier Tan [email protected]
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Mar 15, 2025
Description of PR
Summary:
Fixes sonic-net#16436, caused by added BGP check in sonic-net#15936, which doesn't account for T2 BGP time to come up

Approach
What is the motivation for this PR?
Function wait_bgp_sessions timeout is too short for T2, fails in test_mgmt_ipv6_only test suite causing a fixture to error wrongly and not teardown properly leaving TB in bad state without ipv4 mgmt ip

How did you do it?
Increase timeout to 900s from 120s if duthost it is checking is supervisor

How did you verify/test it?
Run locally on T2

See for passing test:

17/01/2025 07:34:39 utilities.wait_until                     L0153 DEBUG  | check_bgp_session_state_all_asics is False, wait 10 seconds and check again
17/01/2025 07:34:49 utilities.wait_until                     L0135 DEBUG  | Time elapsed: 164.073392 seconds
Confirming it needs more than 120 seconds

Signed-off-by: Javier Tan [email protected]
Co-authored-by: Jianquan Ye <[email protected]>
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