kytos-ng / mef_eline

Kytos NApp to create and manage point-to-point L2 circuits
https://kytos-ng.github.io/api/mef_eline.html
MIT License
0 stars 9 forks source link

Flows are left behind in case of a FlowMod Exception during the deploy to a path #82

Open italovalcy opened 3 years ago

italovalcy commented 3 years ago

When you create an EVC, one of the steps of the creation process is to deploy the EVC.

If one of the switches in the path (NNI) gets disconnected while mef_eline is setting up the primary_path, a FlowModException will be raised (https://github.com/kytos-ng/mef_eline/blob/master/models.py#L628). To handle the FlowModException, mef_eline -- via remove_current_flows(use_path) -- makes a call for flow_manager to remove the previously chosen path (https://github.com/kytos-ng/mef_eline/blob/master/models.py#L630).

Since one of the switches in the path is disconnected, the remove_current_flows() will also fail. The EVC will end up being saved to the storehouse with current_path = Path([]). Later on, mef_eline's consistency routine will try to redeploy the EVC. Since the current_path will be empty, the remove_current_flows() will only address the removal of UNI's flows, but not the NNI (which, btw, at the point will be unknown).

ajoaoff commented 3 years ago

@italovalcy I couldn't find where there flows left behind. After a FlowModException when installing the flows, remove_current_flows is called and removes the flows from the switches were they have been installed. The only way some flow is left behind is if a switch disconnects between the install e delete calls.