Uploaded image for project: 'SEBA'
  1. SEBA
  2. SEBA-834

DhcpL2Relay won't activate when useOltUplinkForServerPktInOut is set to true

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: To Do (View Workflow)
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: SEBA-Next
    • Component/s: ONOS & Apps
    • Labels:
      None
    • Environment:

      dhcpl2relay version: 1.6.0

      Description

      If useOltUplinkForServerPktInOut is set to true when org.opencord.dhcpl2relay (version 1.6.0) is being activated, it'll hit a NPE

      2019-09-26 19:27:51,823 | ERROR | p-app-activation | dhcpl2relay-app                  | 180 - org.opencord.dhcpl2relay-app - 1.6.0 | [org.opencord.dhcpl2relay.impl.DhcpL2Relay(172)] The activate method has thrown an exception
      java.lang.NullPointerException
              at org.opencord.dhcpl2relay.impl.DhcpL2Relay.getUplinkPortsOfOlts(DhcpL2Relay.java:375)
              at org.opencord.dhcpl2relay.impl.DhcpL2Relay.updateConfig(DhcpL2Relay.java:297)
              at org.opencord.dhcpl2relay.impl.DhcpL2Relay.activate(DhcpL2Relay.java:199)
      

      It's because in activate() function, updateConfig() is called before subsService gets initiated.

      This only happens when ONOS already has some devices discovered when dhcpl2relay is being activated and in our case it's the AGG switch. We should probably add a filter to check only OLT devices here:

      // find all the olt devices and if their uplink ports are visible
      Iterable<Device> devices = deviceService.getDevices();
      for (Device d : devices) { ... }
      

        Attachments

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

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            You You Wang (Inactive)
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes