[warm-reboot test] Update warm-reboot test to support kvm image#2392
[warm-reboot test] Update warm-reboot test to support kvm image#2392shi-su merged 23 commits intosonic-net:masterfrom
Conversation
|
This pull request introduces 1 alert when merging 82304d6a32d93578b5065474b84bbfed8272f8b3 into 1b5539d - view on LGTM.com new alerts:
|
|
can you provide the command to run this test and also the test results? |
There was a problem hiding this comment.
nit: spaces around = do not match lines below. It is preferred to stick to module style.
There was a problem hiding this comment.
Interestingly the first half of these check_params do not have the spaces while the second half of them have. I originally put it as the last one and matched the style there. For some reason, I moved it to the first one.
Anyway, I updated all of them so that the style matches. Thanks for catching this.
There was a problem hiding this comment.
health checks are separate and so why checking for kvm_test here?
There was a problem hiding this comment.
Added handle_advanced_reboot_health_check_kvm to separate tests for kvm and real switches.
There was a problem hiding this comment.
I see you have separate health check for kvm and so suggest to clean up the code a bit as there is not need to check for kvm_test inside handle_fast_reboot_health_check and handle_warm_reboot_health_check.
There was a problem hiding this comment.
Cleaned up as suggested.
|
@shi-su, can you add your test in tests/kvmtest.sh, it will be automatically tested in the testbed now as part of the pr check. |
9d49cf4 to
3045843
Compare
tests/kvmtest.sh
Outdated
There was a problem hiding this comment.
is this the right position? should we add to as the first entry?
There was a problem hiding this comment.
Moved up the advanced reboot tests. Since pc/test_po_cleanup.py has a config reload the test, I moved it to the last one to execute.
Also, the run_tests.sh script had a logic to sort the tests according to the alphabetical order. This would mess up the order we want it to run tests. I think there is limited benefit to run tests in alphabetical order. Therefore, I updated run_tests.sh so that the tests are run in the order of command line input
|
can you check the test failure? |
Yes, working on this. |
There was a problem hiding this comment.
what is this reboot limit? why do we have different reboot limit for kvm v.s. physical devices?
There was a problem hiding this comment.
The reboot limit is basically the limit for data plane down time. Since kvm is expected to experience a longer data plane down time, I set different default values for kvm and physical devices.
|
what is the reason all sad path tests are skipped? |
tests/run_tests.sh
Outdated
There was a problem hiding this comment.
this change is good. can you pull this into a new pr?
There was a problem hiding this comment.
duthost.facts['asic_type'] == 'vs': [](start = 11, length = 35)
Better to check x86_64-kvm_x86_64-r0 in platform #Closed
There was a problem hiding this comment.
Checking x86_64-kvm_x86_64-r0 in platform instead.
There was a problem hiding this comment.
kvmCompatible [](start = 56, length = 13)
Why we need this? #Closed
There was a problem hiding this comment.
Removed this and checking pytest mark instead.
There was a problem hiding this comment.
handle_advanced_reboot_health_check_kvm [](start = 8, length = 39)
The function body is similar to handle_fast_reboot_health_check. Reuse code? #Closed
There was a problem hiding this comment.
The logic in kvm test is different from handle_fast_reboot_health_check. For example, fast reboot test expects the data plane to stay up for a while after the control plane goes down, this is not expected in kvm. Reusing the code requires a lot of checks for kvm in the function, which is a kind of distraction. Also, separating it into another function would make kvm tests and real switch tests independence. It would be beneficial if we want to add kvm or physical device specific checks in the future, since we only need to change the corresponding functions.
There was a problem hiding this comment.
device_type [](start = 13, length = 11)
filter by platfrom kvm? #WontFix
There was a problem hiding this comment.
The device_type marker is currently used in other tests to mark kvm-compatible tests [ref: #1860]. I wanted to use the same marker to make it consistent with other test cases.
8364b35 to
c6fefc0
Compare
|
retest vsimage please |
1 similar comment
|
retest vsimage please |
Update sonic-swss submodule pointer to include the following: * 8eea92e [202205][counters] Revert PR sonic-net#2432 for the buffer queue/pg counters improvement ([sonic-net#2462](sonic-net/sonic-swss#2462)) * 5d8636a [202205] Enhance orchagent and buffer manager in error handling (sonic-net#2414) ([sonic-net#2449](sonic-net/sonic-swss#2449)) * aa22237 [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (sonic-net#2392) ([sonic-net#2455](sonic-net/sonic-swss#2455)) * 04ce7be check state_db for po before sending ARP/ND pkts (sonic-net#2444) ([sonic-net#2450](sonic-net/sonic-swss#2450)) * f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451)) * 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437)) * 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432))
Description of PR
Summary: Update warm-reboot test to support kvm image
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
The motivation of this PR is to enable basic checks of the warm-reboot functionality using kvm images.
How did you do it?
As the data plane will go down in kvm image during warm-reboot. I changed the test logic to mainly focusing on the control plane behavior and relax data plane constraints.
A mark is added in the testcase to indicate it support kvm image and to filter out testcases not compatible for kvm test.
Example command to run the test
pytest platform_tests/test_advanced_reboot.py --testbed=vms-kvm-t0 --inventory veos_vtb --host-pattern all --user admin -vvv --show-capture stdout --testbed_file vtestbed.csv --disable_loganalyzer --skip_sanityTest output
Ptftest summary
How did you verify/test it?
Verified by running the testcase locally on kvm
Any platform specific information?
This change is to enable extra support for kvm platform in warm-reboot test. It should not affect advanced reboot tests for other platforms
Supported testbed topology if it's a new test case?
Documentation