Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-900

sal-compatibility not get up-to-date flow information.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • None
    • Helium
    • adsal
    • None
    • Operating System: All
      Platform: All

    • 2098

      sal-compatibility does not get up-to-date flow information.
      This is the root cause of VTN-40.

      InventoryAndReadAdapter class of sal-compatibility implements readAllFlow method.
      List<FlowOnNode> readAllFlow(final Node node, final boolean cached).

      When the second parameter "cached" is false, this method must get flow information directly from the hardware node, and return it.

      https://jenkins.opendaylight.org/controller/job/controller-merge/lastSuccessfulBuild/artifact/target/apidocs/org/opendaylight/controller/sal/reader/IPluginInReadService.html#readAllFlow(org.opendaylight.controller.sal.core.Node,%20boolean)

      However, the implementation of this method does not check the second parameter "cached", and it always returns cached information even if the second parameter "cached" is false.

      InventoryAndReadAdapter.java
      ----------------------------

      controller/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/InventoryAndReadAdapter.java

      253 @Override
      254 public List<FlowOnNode> readAllFlow(final Node node, final boolean cached) {
      255 final ArrayList<FlowOnNode> output = new ArrayList<>();
      256 final Table table = readOperationalTable(node, OPENFLOWV10_TABLE_ID);
      257 if (table != null) {
      258 final List<Flow> flows = table.getFlow();
      259 LOG.trace("Number of flows installed in table 0 of node {} : {}", node, flows.size());
      260
      261 for (final Flow flow : flows) {
      262 final FlowStatisticsData statsFromDataStore = flow.getAugmentation(FlowStatisticsData.class);
      263 if (statsFromDataStore != null)

      { 264 final FlowOnNode it = new FlowOnNode(ToSalConversionsUtils.toFlow(flow, node)); 265 output.add(addFlowStats(it, statsFromDataStore.getFlowStatistics())); 266 }

      267 }
      268 }
      269
      270 return output;
      271 }

            kramesha@cisco.com Kamal Rameshan
            Hideyuki1985 Hideyuki Tai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: