VxLAN Automation: Adding all remaining testcases, and the required modifications.#5059
VxLAN Automation: Adding all remaining testcases, and the required modifications.#5059prsunny merged 15 commits intosonic-net:masterfrom rraghav-cisco:rraghav-vxlan2
Conversation
|
@dgsudharsan , @sumukhatv , could you folks please review? |
|
@ihorchekh @roysr-nv Can you please review the tests? |
|
@dgsudharsan @ihorchekh @roysr-nv any updates on this? please review this PR at your earliest conv |
roy-sror
left a comment
There was a problem hiding this comment.
Hi,
Can you please provide the runtime of this test suite, how much time would it take to run the entire suite?
Can you please use allure steps, rather than comments, it would make the allure report much more readable.
ihorchekh
left a comment
There was a problem hiding this comment.
Here are some suggestions from my side.
|
This pull request fixes 1 alert when merging 2c47f9d into 10debf5 - view on LGTM.com fixed alerts:
|
|
This pull request fixes 1 alert when merging 5528f35 into 10debf5 - view on LGTM.com fixed alerts:
|
|
@roysr-nv : The latest test run took 6100 seconds, close to 2 hours. I have seen it varying from close to 1 hour to 2 hours. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@kevinwangsk @rraghav-cisco where are we with this PR? |
|
I tried on 8102, there are four test cases failed, other 52 are passed. |
|
@kevinskwang this PR by @dgsudharsan should fix this |
|
Those cases looks good to me~ Just one question, why expect the overlay DMAC still to be the dut_mac after encap? should it be the dest VM's MAC in the vnet? |
|
…ic-mgmt into rraghav-vxlan2 Pulling changes from master to rraghav-vxlan2.
|
This pull request fixes 1 alert when merging 9432578 into 35f25e1 - view on LGTM.com fixed alerts:
|
Turned on the ECN testing, which was turned off till now. Needed a minor modification to the ECN calculation.
|
This pull request fixes 1 alert when merging 9fb0a5c into 35f25e1 - view on LGTM.com fixed alerts:
|
|
@ihorchekh @dgsudharsan @prsunny : Can we merge this PR pls? |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@ihorchekh @dgsudharsan, please sign-off |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| self.setup['duthost'].shell("sudo config interface shutdown {}".format(intf)) | ||
|
|
There was a problem hiding this comment.
This test case sometimes fails here. I did debug and found that we need some delay after bringing interfaces down and sending packets. I believe 10-sec sleep will be enough.
I tried to use it here wait_until logic with passing all_intfs list, like wait_until(60, 30, 0, bgp_established, self.setup['duthost'], all_intfs) and I found another issue in bgp_established function, see below
tests/vxlan/test_vxlan_ecmp.py
Outdated
| pytest_assert(wait_until(300, 30, 0, bgp_established, self.setup['duthost']), "BGP neighbors didn't come up after all interfaces have been brought up.") | ||
|
|
||
| logger.info("Verify the traffic is flowing through, again.") | ||
| self.dump_self_info_and_run_ptf("tc12", encap_type, True, packet_count=1000) |
There was a problem hiding this comment.
| self.dump_self_info_and_run_ptf("tc12", encap_type, True, packet_count=1000) | |
| self.dump_self_info_and_run_ptf("tc14", encap_type, True, packet_count=1000) |
| pytest_assert(wait_until(300, 30, 0, bgp_established, self.setup['duthost']), "BGP neighbors didn't come up after all interfaces have been brought up.") | ||
| logger.info("Verify traffic flows after recovery.") | ||
| self.setup[encap_type]['t2_ports'] = all_t2_ports | ||
| self.dump_self_info_and_run_ptf("tc12", encap_type, True, packet_count=1000) |
There was a problem hiding this comment.
| self.dump_self_info_and_run_ptf("tc12", encap_type, True, packet_count=1000) | |
| self.dump_self_info_and_run_ptf("tc13", encap_type, True, packet_count=1000) |
| logger.info("Bring down the T2 interfaces.") | ||
| for intf in all_intfs: | ||
| self.setup['duthost'].shell("sudo config interface shutdown {}".format(intf)) | ||
|
|
There was a problem hiding this comment.
| time.sleep(10) |
or wait_until with passing all_intfs as ignore_list, but only if the issue mentioned above in bgp_established will be fixed.
| pytest_assert(wait_until(60, 30, 0, bgp_established, self.setup['duthost'], all_intfs), "BGP neighbors didn't come down after all interfaces have been brought down.") |
|
@prsunny I believe I'll approve after my comments above will be resolved |
|
This pull request fixes 1 alert when merging f02fa5d into cb01d8b - view on LGTM.com fixed alerts:
|
1. Added more stringent checks for bgp_established() function. Now it verifies the down neighbors as well as the established neighbors. 2. Fixed minor typos in TC names, comments and logs. 3. Called the bgp_established() after bringing down the interfaces in tc12. (as per review comments).
|
This pull request fixes 1 alert when merging 411bd24 into cb01d8b - view on LGTM.com fixed alerts:
|
@ihorchekh , Please review the latest change |
|
@prsunny @rraghav-cisco I've run the updated test and I've got a 100% pass rate, 60/60. |
prsunny
left a comment
There was a problem hiding this comment.
Thanks @rraghav-cisco , @ihorchekh, @roysr-nv for the great contributions on implementation and review
…difications. (#5059) * Implement part 2 of the Vxlan Overlay ECMP Test cases.
| # Every next-hop should have received within 1% of the packets that we sent per nexthop(which is self.packet_count). | ||
| # This check is valid only if there are large enough number of packets(300). Any lower number will need higher tolerance(more than 2%). | ||
| if self.packet_count > MINIMUM_PACKETS_FOR_ECMP_VALIDATION: | ||
| tolerance = 0.01 |
There was a problem hiding this comment.
@rraghav-cisco please clarify what this 1% value is based on. Unfortunately I was not able to find it in feature requirement docs
This is part 2 of the Vxlan Test case Automation.
Adding the rest of test cases from https://github.com/Azure/SONiC/blob/8ca1ac93c8912fda7b09de9bfd51498e5038c292/doc/vxlan/Overlay%20ECMP%20with%20BFD.md#test-cases
I have combined 13th and 14th cases into a single case in this script.
The commit on mar 28th also added a new test, a variant of TC9.