Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the flaky test in the ProtectedPathSpec #5648

Closed
wants to merge 1 commit into from

Conversation

izadorozhna
Copy link
Collaborator

@izadorozhna izadorozhna commented Apr 25, 2024

Implements #5390
Related to #5608

  • Fixed the test "Flow swaps to protected path when main path gets broken, becomes DEGRADED if protected path is unable to reroute(no bw)"
  • Earlier in some cases when the switchPair was set to 2-3 or 8-9, the protected path had only 1 ISL and it had enough BW, so the test failed because the BW was not reduced for some protected path ISLs.
  • Now this test passes even when the swPair is 2-3 or 8-9, and other switches. So the temporary fix to skip 8-9 switches is removed.
  • Removed the workaround to skip 8-9 switches from 2 tests (valid when Fixed the flaky test when the flow swaps to protected path #5645 is merged)

@izadorozhna
Copy link
Collaborator Author

Please see my comments and screenshots under #5608 issue

@izadorozhna izadorozhna marked this pull request as draft April 25, 2024 18:56
@izadorozhna izadorozhna reopened this Apr 25, 2024
Implements #5390
Related to #5608

* Fixed the test "Flow swaps to protected path when main path gets
  broken, becomes DEGRADED if protected path is unable to
  reroute(no bw)"
* Earlier in some cases when the switchPair was set to 2-3 or 8-9,
  the protected path had only 1 ISL and it had enough BW, so the
  test failed because the BW was not reduced for some protected
  path ISLs.
* Now this test passes even when the swPair is 2-3 or 8-9, and
  other switches. So the temporary fix to skip 8-9 switches
  is removed.
* Removed the workaround to skip 8-9 from 2 tests
@izadorozhna izadorozhna force-pushed the test/5390_flaky_protected_path_spec branch from b058639 to 7dc6659 Compare April 25, 2024 19:51
@izadorozhna izadorozhna marked this pull request as ready for review April 25, 2024 19:51
def switchPair = switchPairs.all()
.excludeSwitches(switchesWhere5608IsReproducible)
.withAtLeastNNonOverlappingPaths(2).random()
def switchPair = switchPairs.all().withAtLeastNNonOverlappingPaths(2).random()
Copy link
Collaborator

Choose a reason for hiding this comment

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

What exactly is the fix? #5608 is still open and not solved, as far as I can see.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, let me add some details to explain my PR.

So, I was debugging a couple of tests (namely, "Flow swaps to protected path when main path gets broken, becomes DEGRADED if protected path is unable to reroute(no bw)" and "Flow swaps to protected path when main path gets broken, becomes DEGRADED if protected path is unable to reroute(no path)" because they failed sometimes for the past month. The failure was related to the same Couldn't find non overlapping protected path. Skipped creating it error message mentioned in #5608. So, even with the WA to skip 8-9 switches, the overlapping issue was still reproducible.

  • Flow swaps to protected path when main path gets broken, becomes DEGRADED if protected path is unable to reroute(no bw) - here the issue was still reproducible between the switches 2-3, please see the screenshot below.
    image
    When I investigated this test, it turned out that the protected path ISL has enough bw, that is why the test cannot get expected "Not enough bandwidth or no path found" message. So the fix in this PR is done to reduce the BW on the original protected path ISLs. So, with this fix, the test passes because the flow is degraded due to the expected "Not enough bandwidth or no path found" message. So, now no need to skip 8-9 switches since with the correct BW reducing, the test passes.
  • Flow swaps to protected path when main path gets broken, becomes DEGRADED if protected path is unable to reroute(no path) - this test also failed sometimes due to Overlapping issue - even with the WA to skip 8-9 switches. I made the PR Fixed the flaky test when the flow swaps to protected path #5645 to fix this test because the ISLs were not broken correctly there. But now I see that with this fix from Fixed the flaky test when the flow swaps to protected path #5645, the WA to skip 8-9 can be removed, it is not reproduced anymore.

So, I have executed both these tests 20 times with just 8-9 switchpair, 2-3 switchpair, random switchpair and the overlapping issue is not reproduced anymore - the tests are passing. Thus, there is no need to exclude 8-9 switches from the switchpair anymore.


when: "Create flow with protected path"
def flow = flowHelperV2.randomFlow(switchPair).tap { allocateProtectedPath = true }
flowHelperV2.addFlow(flow)
def path = northbound.getFlowPath(flow.flowId)

and: "Other paths have not enough bandwidth to host the flow in case of reroute"
def otherIsls = switchPair.paths.findAll { it != pathHelper.convert(path.protectedPath) &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

when we removed path.protectedPath from exclusion, we set up bandwidth less that required (protected path), but after isl break, our new main path is UP (very strange behaviour). Need to discuss.

@izadorozhna izadorozhna closed this May 7, 2024
@izadorozhna
Copy link
Collaborator Author

Closing since the fix was not correct. It was not correct to break the used ISLs in protected or main path.

@izadorozhna
Copy link
Collaborator Author

The new PR will be created instead

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