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

nbworker add feature to reroute y-flow for switch/link evacuation process #5751

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

IvanChupin
Copy link
Collaborator

@IvanChupin IvanChupin commented Nov 14, 2024

Now it is possible to trigger y-flow reroute process by calling
/v1/switches/{switch-id}/under-maintenance API with the following body:

{
  "under_maintenance": true,
  "evacuate": true
}

for transit switches of the y-flow. (not y-point, shared switches)

FOR TEST TEAM:
To test feature manually you have to go to the Switch details page, toggle switch into maintenance mode and then press evacuate button. This should evacuate flows and y-flow subflows from the switch. It will trigger reroute process for y-flows and flows that uses particular current switch.

if you click on the evacuate button without maintenance mode it should show you pop up info message
image

The same logic applied to the ISL details page.

For the info:
If you have some isl in maintenance mode then you can not trigger evacuate flow process from switch without having it in maintenance mode.(and vice versa) What I was saying is that ISL maintenance mode and switch maintenance mode are not depend on each other at all and have no correlation.

From the autotest point of view, please, ping me to discuss.

@yuliiamir
Copy link
Collaborator

Found issue: Bulk reroute has not been called for flows when triggering evacuation as an additional step after enabling Maintenance mode (for both ISl and switch).

@IvanChupin IvanChupin force-pushed the feature/evacuate-y-flow branch from 77dc9b8 to 4f1878e Compare November 20, 2024 11:56
@yuliiamir
Copy link
Collaborator

yuliiamir commented Nov 22, 2024

Verified for Regular Flow and Y-Flow:

  1. Evacuation from an intermediate switch that was under maintenance(flows use different intermediate switch Isls):
  • flows evacuation was called in the scope of maintenance mode enabling;

  • flows evacuation was called as an additional step after enabling maintenance mode.

Sw3WithRegularFlowAndYFlowBeforeReroute

After bulk evacuation, ONLY flows that have src/dst which is the intermediate switch are still on this switch. Note, that reroute requests for these flows were sent and the flow path can be changed to the best one if it exists.

Sw3AfterBulkReroute

  1. Evacuation from ISL under maintenance:
  • flows evacuation was called in the scope of maintenance mode enabling;

  • flows evacuation was called as an additional step after enabling maintenance mode.

IslEvacuation2(6)(19)7

All flows were evacuated from ISL under maintenance. Note, when one of the Y-Flow sub-flows has this ISL in its path, reroute is called for both sub-flows (both sub-flows can be rerouted (one in the scope of avoiding ISL under maintenance, another if the best path is found )).
Note, that if there is not enough bandwidth for flows to be evacuated, these flows remain on the same path

If maintenance mode is OFF for ISL/Switch, flows evacuation is unavailable.

The required tests have been added in the scope of #5754

Copy link
Collaborator

@pablomuri pablomuri left a comment

Choose a reason for hiding this comment

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

Great job!

@IvanChupin IvanChupin force-pushed the feature/evacuate-y-flow branch 4 times, most recently from 307db11 to bd2e3db Compare December 2, 2024 13:29
…cess

added evacuate y-flow button that replace evacuate toggle, slightly fix evacuate button logic.
add new info message in toastrService regarding flow evacuation.
@IvanChupin IvanChupin force-pushed the feature/evacuate-y-flow branch from bd2e3db to f37b6d6 Compare December 2, 2024 13:52
@IvanChupin IvanChupin force-pushed the feature/evacuate-y-flow branch from f37b6d6 to 06f5163 Compare December 2, 2024 13:59
@IvanChupin IvanChupin merged commit 85939b4 into develop Dec 3, 2024
3 checks passed
@IvanChupin IvanChupin deleted the feature/evacuate-y-flow branch January 23, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants