Add static route check in warm reboot#21694
Merged
bingwang-ms merged 6 commits intosonic-net:masterfrom Jan 13, 2026
Merged
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
632c256 to
2c96698
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
48932a3 to
8f87874
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
hdwhdw
reviewed
Jan 7, 2026
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
86c3a9a to
c95bb7c
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
096ff99 to
5050930
Compare
Collaborator
|
/azp run |
1 similar comment
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
532936c to
a99f348
Compare
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: xincunli-sonic <[email protected]>
Signed-off-by: xincunli-sonic <[email protected]>
Signed-off-by: xincunli-sonic <[email protected]>
Signed-off-by: xincunli-sonic <[email protected]>
Signed-off-by: xincunli-sonic <[email protected]>
Signed-off-by: xincunli-sonic <[email protected]>
51a361b to
02f5271
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
hdwhdw
approved these changes
Jan 9, 2026
Collaborator
|
Hi @xincunli-sonic , can you add a snapshot of test result from at least 1 physical testbed since this is a new test module? |
yifan-nexthop
pushed a commit
to nexthop-ai/sonic-mgmt
that referenced
this pull request
Jan 14, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: YiFan Wang <[email protected]>
PriyanshTratiya
pushed a commit
to PriyanshTratiya/sonic-mgmt
that referenced
this pull request
Jan 21, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: Priyansh Tratiya <[email protected]>
AndoniSanguesa
pushed a commit
to AndoniSanguesa/sonic-mgmt
that referenced
this pull request
Jan 21, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: Andoni Sanguesa <[email protected]>
AndoniSanguesa
pushed a commit
to AndoniSanguesa/sonic-mgmt
that referenced
this pull request
Jan 21, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: Andoni Sanguesa <[email protected]>
ytzur1
pushed a commit
to ytzur1/sonic-mgmt
that referenced
this pull request
Feb 2, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: Yael Tzur <[email protected]>
abhishek-nexthop
pushed a commit
to nexthop-ai/sonic-mgmt
that referenced
this pull request
Feb 6, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]>
nnelluri-cisco
pushed a commit
to nnelluri-cisco/sonic-mgmt
that referenced
this pull request
Feb 12, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: nnelluri-cisco <[email protected]>
rraghav-cisco
pushed a commit
to rraghav-cisco/sonic-mgmt
that referenced
this pull request
Feb 13, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: Raghavendran Ramanathan <[email protected]>
anilal-amd
pushed a commit
to anilal-amd/anilal-forked-sonic-mgmt
that referenced
this pull request
Feb 19, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: Zhuohui Tan <[email protected]>
abhishek-nexthop
pushed a commit
to nexthop-ai/sonic-mgmt
that referenced
this pull request
Mar 17, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]> Signed-off-by: Abhishek <[email protected]>
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Mar 27, 2026
* Add static route check in warm reboot Signed-off-by: xincunli-sonic <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary
Adds comprehensive tests to validate static route persistence and traffic forwarding during warmboot and config reload scenarios.
Fixes: sonic-net/sonic-buildimage#21423
Type of change
Back port request
Approach
What is the motivation for this PR?
Static routes were not being validated during warmboot and config reload operations, leading to issues where routes could be lost or traffic forwarding could fail after these critical operations. Issue #21423 reported that static routes were not persisting correctly through warmboot, causing network connectivity problems.
How did you do it?
Added 4 new comprehensive test functions to
tests/route/test_static_route.py:test_static_route_warmboot- Tests IPv4 static route persistence through warmboottest_static_route_ecmp_warmboot- Tests IPv4 ECMP static routes with multiple nexthops through warmboottest_static_route_ipv6_warmboot- Tests IPv6 static route persistence through warmboottest_static_route_config_reload_with_traffic- Tests static route persistence through config reloadEach test follows a complete lifecycle:
How did you verify/test it?
In Lab:
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
/opt/venv/lib/python3.12/site-packages/pytest_ansible/host_manager/v213.py:13: DeprecationWarning: Host management is deprecated and will be removed in a future release
class HostManagerV213(BaseHostManager):
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
/opt/venv/lib/python3.12/site-packages/ansible/plugins/loader.py:1485: UserWarning: AnsibleCollectionFinder has already been configured
warnings.warn('AnsibleCollectionFinder has already been configured')
tests/route/test_static_route.py: 186 warnings
/usr/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=79633) is multi-threaded, use of fork() may lead to deadlocks in the child.
self.pid = os.fork()
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
/var/src/sonic-mgmt-int/tests/conftest.py:1363: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
record_testsuite_property("timestamp", datetime.utcnow())
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
/var/src/sonic-mgmt-int/tests/common/dualtor/mux_simulator_control.py:705: DeprecationWarning: Deprecated toggle fixture, please use setup_dualtor_mux_ports (docs/tests/setup.dualtor.mux.ports.md).
warnings.warn("Deprecated toggle fixture, please use setup_dualtor_mux_ports "
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
tests/route/test_static_route.py::test_static_route_warmboot[str2-7260cx3-acs-11]
/opt/venv/lib/python3.12/site-packages/ptf/mask.py:69: DeprecationWarning: "set_do_not_care_scapy" is going to be deprecated, please switch to the new one: "set_do_not_care_packet"
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---------------------------------------------------------------------- generated xml file: /var/src/sonic-mgmt-int/tests/logs/route/test_static_route.py::test_static_route_warmboot.xml -----------------------------------------------------------------------
Results (716.58s (0:11:56)):
1 passed
DEBUG:tests.conftest:[log_custom_msg] item: <Function test_static_route_warmboot[str2-7260cx3-acs-11]>
INFO:root:Can not get Allure report URL. Please check logs
yanmo@sonic-mgmt-yanmo:/var/src/sonic-mgmt-int/tests$ cat /var/src/sonic-mgmt-int/tests/logs/route/test_static_route.py::test_static_route_warmboot.xml
Any platform specific information?
pytest.mark.device_type('vs')for virtual switch supportSupported testbed topology if it's a new test case?
Tests are compatible with both single-TOR and dual-TOR configurations.
Documentation