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

Resource store throws exception when queried for non-registered continuous resource

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.10.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      1

      Description

      When availability of Continuous resource is queried, but the resource is not registered, ResourceStore exceptionaly fails throwing Exception.
      It'll be better to return availability=false.

      java.util.NoSuchElementException: No value present
      	at java.util.Optional.get(Optional.java:135)[:1.8.0_101]
      	at org.onosproject.store.resource.impl.ConsistentContinuousResourceSubStore.isAvailable(ConsistentContinuousResourceSubStore.java:100)
      	at org.onosproject.store.resource.impl.ConsistentResourceStore.isAvailable(ConsistentResourceStore.java:277)
      	at org.onosproject.net.resource.impl.ResourceManager.isAvailable(ResourceManager.java:201)
      	at org.onosproject.newoptical.OpticalPathProvisioner$BandwidthLinkWeight.hasEnoughBandwidth(OpticalPathProvisioner.java:646)
      	at org.onosproject.newoptical.OpticalPathProvisioner$BandwidthLinkWeight.weight(OpticalPathProvisioner.java:609)
      	at org.onosproject.net.topology.AdapterLinkWeigher.weight(AdapterLinkWeigher.java:39)
      	at org.onosproject.net.topology.AdapterLinkWeigher.weight(AdapterLinkWeigher.java:27)
      	at org.onlab.graph.AbstractGraphPathSearch$DefaultResult.relaxEdge(AbstractGraphPathSearch.java:175)
      	at org.onlab.graph.DijkstraGraphSearch.internalSearch(DijkstraGraphSearch.java:63)
      	at org.onlab.graph.AbstractGraphPathSearch.search(AbstractGraphPathSearch.java:322)
      	at org.onosproject.common.DefaultTopology.getPaths(DefaultTopology.java:381)
      	at org.onosproject.common.DefaultTopology.getPaths(DefaultTopology.java:350)
      	at org.onosproject.store.topology.impl.DistributedTopologyStore.getPaths(DistributedTopologyStore.java:225)
      	at org.onosproject.net.topology.impl.TopologyManager.getPaths(TopologyManager.java:173)
      	at org.onosproject.net.topology.AbstractPathService.getPaths(AbstractPathService.java:101)
      	at org.onosproject.net.topology.impl.PathManager.getPaths(PathManager.java:90)
      	at org.onosproject.net.topology.AbstractPathService.getPaths(AbstractPathService.java:70)
      	at org.onosproject.net.topology.impl.PathManager.getPaths(PathManager.java:84)
      	at org.onosproject.newoptical.OpticalPathProvisioner.setupConnectivity(OpticalPathProvisioner.java:249)
      	at org.onosproject.newoptical.cli.AddOpticalConnectivityCommand.execute(AddOpticalConnectivityCommand.java:73)
      	at org.onosproject.cli.AbstractShellCommand.doExecute(AbstractShellCommand.java:150)
      	at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[27:org.apache.karaf.shell.console:3.0.8]
      	at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[27:org.apache.karaf.shell.console:3.0.8]
      	at Proxya96b366d_53f8_4196_8c65_48d541ed957e.execute(Unknown Source)[:]
      	at Proxya96b366d_53f8_4196_8c65_48d541ed957e.execute(Unknown Source)[:]
      	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[27:org.apache.karaf.shell.console:3.0.8]
      	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[27:org.apache.karaf.shell.console:3.0.8]
      	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[27:org.apache.karaf.shell.console:3.0.8]
      	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[27:org.apache.karaf.shell.console:3.0.8]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[27:org.apache.karaf.shell.console:3.0.8]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[27:org.apache.karaf.shell.console:3.0.8]
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
      	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:210)
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:158)[47:org.apache.karaf.shell.ssh:3.0.8]
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:133)
      	at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_101]
      	at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[28:org.apache.karaf.jaas.modules:3.0.8]
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:129)[47:org.apache.karaf.shell.ssh:3.0.8]
      

        Attachments

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

          Activity

            People

            • Assignee:
              y-higuchi Yuta Higuchi
              Reporter:
              y-higuchi Yuta Higuchi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: