-
Type: Bug
-
Status: Resolved (View Workflow)
-
Priority: Medium
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: VOLTHA v2.10
-
Component/s: bbsim, openolt-adapter, openolt-agent
-
Labels:None
-
Story Points:5
Scheduler and queue remove may fail during childDeviceLost handling at openolt adapter if flows are not removed first.
Following is the context provided byyasin sapli
----------------------------------------------------------------------
There are mainly three things to be cleared/removed while force deleting onu. Flows, queues and schedulers. These are need to be removed from the system in this order because for instance queues are not possible to delete if connected to a flow.Your last changes in forceRemoveSchedulerQueues function is necessary but I think it is not enough. We need to remove the flows from openolt agent as well.
So here comes the problem:We need a parameter in type of Flow to remove a flow. Ex: FlowRemove(ctx context.Context, in *Flow, opts ...grpc.CallOption) (*Empty, error)Since we no longer store flows in volthaDB, we have only flowId in openolt-adapter (I am talking about ChildDeviceLost method here) and flowId is not enough for delete action.
I checked the openolt agent code and realized agent acutally only using flowId and FlowType(Upstream, Downstream or Multicast) in flow parameter. Now comes the second problem. Openolt adapter doesn't knw FlowType because we are not saving it anywhere
I think we have two possible solutions here.
1. In rw-core, Before calling ChildDeviceLost, lets call a function called DeleteAllChildFlows. Since rw-core stores the flows in it's cache, it is possible to remove flows. The adapter will have DeleteAllChildFlows function and rw-core can send flows as parameter instead of only flowId.
2. In adapter, Lets create a new map like flowIdsForOnu but with FlowType as well. In this way, we can call FlowRemove fucntion from openolt-agent
----------------------------------------------------------------------
PS: Checkout the comment section for the latest updates