Skip to content

[vs tests]: Add mirror session warm reboot test#1130

Closed
daall wants to merge 2 commits intosonic-net:masterfrom
daall:warm_reboot_vs_test
Closed

[vs tests]: Add mirror session warm reboot test#1130
daall wants to merge 2 commits intosonic-net:masterfrom
daall:warm_reboot_vs_test

Conversation

@daall
Copy link
Copy Markdown
Contributor

@daall daall commented Nov 13, 2019

What I did
Added a test case to validate that the monitor port is preserved during warm reboot.

Why I did it
To validate #1054

How I verified it

daall@valhalla:~/dev/sonic-swss/tests$ sudo pytest -s -v --dvsname=vs test_warm_reboot.py::TestWarmReboot::test_MirrorSessionWarmReboot -s
=============================================================================================== test session starts ===============================================================================================
platform linux2 -- Python 2.7.15+, pytest-3.3.0, py-1.8.0, pluggy-0.6.0 -- /usr/bin/python2
cachedir: .cache
rootdir: /home/daall/dev/sonic-swss/tests, inifile:
collected 1 item                                                                                                                                                                                                  

test_warm_reboot.py::TestWarmReboot::test_MirrorSessionWarmReboot remove extra link dummy
PASSED                                                                                                                                    [100%]

============================================================================================ 1 passed in 78.33 seconds ============================================================================================

Details if related
Continuation of #1097

Shu0T1an ChenG and others added 2 commits November 12, 2019 16:34
This test validates the post baking stage that recovers
the monitor port picked before the warm reboot.

Signed-off-by: Shu0T1an ChenG <[email protected]>
@daall
Copy link
Copy Markdown
Contributor Author

daall commented Nov 14, 2019

retest this please

2 similar comments
@daall
Copy link
Copy Markdown
Contributor Author

daall commented Nov 19, 2019

retest this please

@daall
Copy link
Copy Markdown
Contributor Author

daall commented Dec 10, 2019

retest this please

@daall daall closed this Dec 18, 2019
@daall daall deleted the warm_reboot_vs_test branch December 18, 2019 01:37
@daall daall restored the warm_reboot_vs_test branch December 18, 2019 01:37
@daall daall reopened this Jan 13, 2020
@daall
Copy link
Copy Markdown
Contributor Author

daall commented Jan 13, 2020

Reopening this PR because the feature branch was deleted inadvertently. 🤦‍♂


# Setup the virtual switch
dvs.setup_db()
dvs.runcmd("config warm_restart enable swss")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suggest moving warm restart setting close to swss restart.

# Perform the warm reboot
dvs.stop_swss()
dvs.start_swss()
time.sleep(5)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is sleep 5 seconds enough? You could polling "show warm_restart state" and wait until orchagent is reconciled. That would take lot longer than 5 seconds though.

@daall daall closed this Nov 6, 2020
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…ic-net#1130)

* [update] removed actual baud from consutil show result table
* [refine] ensure only 1 db querying per command
* [refine] refactor code for better reusing in future
* [new] add a new return value ERR_CFG for indicating configuration issue

Signed-off-by: [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.

2 participants