Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-721

Flows removed from DeviceFlowRegistry after being updated

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 6145

    Description

      The following code is from SalFlowServiceImpl.updateFlow (and annotated):

      //STEP 1: HERE THE FLOW IS MARKED FOR DELETION BUT NOT ACTUALLY DELETED. THE MARK IS BASED ON THE FLOW HASH

      deviceFlowRegistry.markToBeremoved(flowRegistryKey);

      if (itemLifecycleListener != null) {
      final FlowDescriptor flowDescriptor = deviceContext.getDeviceFlowRegistry().retrieveIdForFlow(flowRegistryKey);
      if (flowDescriptor != null)

      { KeyedInstanceIdentifier<Flow, FlowKey> flowPath = createFlowPath(flowDescriptor, deviceContext.getDeviceInfo().getNodeInstanceIdentifier()); itemLifecycleListener.onRemoved(flowPath); }

      }
      //if provided, store flow id to flow registry
      if (flowRef != null) {
      final FlowId flowId = flowRef.getValue().firstKeyOf(Flow.class, FlowKey.class).getId();
      final FlowDescriptor flowDescriptor = FlowDescriptorFactory.create(updated.getTableId(), flowId);

      STEP 2: HERE THE FLOW IS RE-ADDED...
      deviceFlowRegistry.store(updatedflowRegistryKey, flowDescriptor);

      STEP 3: STEP 3: DeviceFlowRegistryImpl.removeMarked is called resulting in the removing of a flow that should not be removed because it was in fact re-added right afterwards. Next time the flow is updated via an OFPST_FLOW it is missing the flow id and therefor receives a generated "alien" id.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jhershbe Josh Hershberg
            jhershbe Josh Hershberg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: