Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-3356

NPE when pushing a net cfg for a device not yet connected

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3
    • Epic Link:
    • Sprint:
      Emu Sprint 3 (11/2 - 11/20)

      Description

      7 node cluster, no devices connected.
      Push the following:
      Sent config:

      {
          "allowed": true,
          "name": "Switch2",
          "owner": "Jenny",
          "rackAddress": 2
      }
      

      To http://10.128.30.12:8181/onos/v1/network/configuration/devices/of:0000000000000002/basic using GET method.

      Logs:

      2015-11-13 11:26:02,512 | INFO  | h for user karaf | command                          | 155 - org.apache.karaf.log.command - 3.0.3 | Adding basic config for s2
      2015-11-13 11:26:12,507 | INFO  | event-dispatch-0 | DeviceManager                    | 143 - org.onosproject.onos-core-net - 1.4.0.SNAPSHOT | Detected Device network config event CONFIG_ADDED
      2015-11-13 11:26:12,556 | WARN  | event-dispatch-0 | ListenerRegistry                 | 75 - org.onosproject.onos-api - 1.4.0.SNAPSHOT | Exception encountered while processing event NetworkConfigEvent{time=2015-11-13T11:26:12.507, type=CONFIG_ADDED, subject=of:0000000000000002}
      java.lang.NullPointerException
      	at org.onosproject.net.device.impl.BasicDeviceOperator.combine(BasicDeviceOperator.java:58)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at org.onosproject.net.device.impl.DeviceManager$InternalNetworkConfigListener.event(DeviceManager.java:742)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at org.onosproject.net.device.impl.DeviceManager$InternalNetworkConfigListener.event(DeviceManager.java:720)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at org.onosproject.event.ListenerRegistry.process(ListenerRegistry.java:66)[75:org.onosproject.onos-api:1.4.0.SNAPSHOT]
      	at org.onosproject.event.impl.CoreEventDispatcher$DispatchLoop.process(CoreEventDispatcher.java:141)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at org.onosproject.event.impl.CoreEventDispatcher$DispatchLoop.run(CoreEventDispatcher.java:124)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_60]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
      	at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
      

      If we send the same json object but without the allowed field for a different device, we get the same exception:

      2015-11-13 11:31:24,096 | INFO  | h for user karaf | command                          | 155 - org.apache.karaf.log.command - 3.0.3 | Adding basic config for s1
      2015-11-13 11:31:56,143 | WARN  | copycat-p7-1     | FollowerState                    | 71 - org.onosproject.onlab-thirdparty - 1.4.0.SNAPSHOT | onos://10.128.30.11:9876 - Rejected AppendRequest[term=2, leader=onos://10.128.30.12:9876, logIndex=1, logTerm=2, entries=[0], firstIndex=false, commitIndex=null]: Previous index (1) is greater than the local log's last index (null)
      2015-11-13 11:31:57,614 | INFO  | event-dispatch-0 | DeviceManager                    | 143 - org.onosproject.onos-core-net - 1.4.0.SNAPSHOT | Detected Device network config event CONFIG_ADDED
      2015-11-13 11:31:57,626 | WARN  | event-dispatch-0 | ListenerRegistry                 | 75 - org.onosproject.onos-api - 1.4.0.SNAPSHOT | Exception encountered while processing event NetworkConfigEvent{time=2015-11-13T11:31:57.614, type=CONFIG_ADDED, subject=of:0000000000000001}
      java.lang.NullPointerException
      	at org.onosproject.net.device.impl.BasicDeviceOperator.combine(BasicDeviceOperator.java:58)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at org.onosproject.net.device.impl.DeviceManager$InternalNetworkConfigListener.event(DeviceManager.java:742)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at org.onosproject.net.device.impl.DeviceManager$InternalNetworkConfigListener.event(DeviceManager.java:720)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at org.onosproject.event.ListenerRegistry.process(ListenerRegistry.java:66)[75:org.onosproject.onos-api:1.4.0.SNAPSHOT]
      	at org.onosproject.event.impl.CoreEventDispatcher$DispatchLoop.process(CoreEventDispatcher.java:141)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at org.onosproject.event.impl.CoreEventDispatcher$DispatchLoop.run(CoreEventDispatcher.java:124)[143:org.onosproject.onos-core-net:1.4.0.SNAPSHOT]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_60]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_60]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_60]
      	at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]
      

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                jhall Jon Hall
                Reporter:
                jhall Jon Hall
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: