[CONTROLLER-1024] Exception when accessing Services Container of the Config Subsystem Created: 13/Nov/14 Updated: 14/Nov/14 Resolved: 14/Nov/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | config |
| Affects Version/s: | Helium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Raghurama Bhat | Assignee: | Maros Marsalek |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 2373 |
| Description |
|
When I access the following restconf URL I get an exception config:modules works fine. This is the standard Helium distribution with the following features loaded. feature:install odl-netconf-all odl-yangtools-all odl-restconf odl-netconf-connector-all odl-netconf-ssh Exception Text: at org.opendaylight.controller.md.sal.common.api.data.ReadFailedException$1.newWithCause(ReadFailedException.java:26) at org.opendaylight.controller.md.sal.common.api.data.ReadFailedException$1.newWithCause(ReadFailedException.java:23) at org.opendaylight.yangtools.util.concurrent.ExceptionMapper.apply(ExceptionMapper.java:80) at org.opendaylight.yangtools.util.concurrent.ExceptionMapper.apply(ExceptionMapper.java:31) at org.opendaylight.yangtools.util.concurrent.MappingCheckedFuture.mapException(MappingCheckedFuture.java:60) at org.opendaylight.yangtools.util.concurrent.MappingCheckedFuture.wrapInExecutionException(MappingCheckedFuture.java:64) at org.opendaylight.yangtools.util.concurrent.MappingCheckedFuture.get(MappingCheckedFuture.java:77) at org.opendaylight.controller.sal.restconf.impl.BrokerFacade.readDataViaTransaction(BrokerFacade.java:186) at org.opendaylight.controller.sal.restconf.impl.BrokerFacade.readConfigurationData(BrokerFacade.java:83) at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.readConfigurationData(RestconfImpl.java:640) at org.opendaylight.controller.sal.restconf.impl.StatisticsRestconfServiceWrapper.readConfigurationData(StatisticsRestconfServiceWrapper.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496) at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:247) at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:210) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:69) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:240) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:77) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:366) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.IllegalArgumentException: Namespace urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi is not owned by a module at com.google.common.base.Preconditions.checkArgument(Preconditions.java:119) at org.opendaylight.yangtools.yang.data.impl.codec.xml.ElementIdentityrefParser.createQName(ElementIdentityrefParser.java:39) at org.opendaylight.yangtools.yang.data.util.AbstractNamespaceCodec.parseQName(AbstractNamespaceCodec.java:82) at org.opendaylight.yangtools.yang.data.util.AbstractStringIdentityrefCodec.deserialize(AbstractStringIdentityrefCodec.java:28) at org.opendaylight.yangtools.yang.data.impl.codec.xml.InstanceIdentifierForXmlCodec.toIdentity(InstanceIdentifierForXmlCodec.java:46) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.resolveValueFromSchemaType(XmlDocumentUtils.java:253) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toSimpleNodeWithType(XmlDocumentUtils.java:232) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toNodeWithSchema(XmlDocumentUtils.java:219) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.access$000(XmlDocumentUtils.java:69) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils$1.apply(XmlDocumentUtils.java:348) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils$1.apply(XmlDocumentUtils.java:339) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.forEachChild(XmlDocumentUtils.java:488) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toDomNodes(XmlDocumentUtils.java:339) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toCompositeNodeWithSchema(XmlDocumentUtils.java:268) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toNodeWithSchema(XmlDocumentUtils.java:217) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.access$000(XmlDocumentUtils.java:69) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils$1.apply(XmlDocumentUtils.java:348) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils$1.apply(XmlDocumentUtils.java:339) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.forEachChild(XmlDocumentUtils.java:488) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toDomNodes(XmlDocumentUtils.java:339) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toCompositeNodeWithSchema(XmlDocumentUtils.java:268) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toNodeWithSchema(XmlDocumentUtils.java:217) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.access$000(XmlDocumentUtils.java:69) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils$1.apply(XmlDocumentUtils.java:348) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils$1.apply(XmlDocumentUtils.java:339) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.forEachChild(XmlDocumentUtils.java:488) at org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toDomNodes(XmlDocumentUtils.java:339) at org.opendaylight.controller.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:107) at org.opendaylight.controller.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:96) at org.opendaylight.controller.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcResult(NetconfMessageTransformer.java:36) at org.opendaylight.controller.sal.connect.netconf.sal.NetconfDeviceRpc.transformResult(NetconfDeviceRpc.java:71) at org.opendaylight.controller.sal.connect.netconf.sal.NetconfDeviceRpc.access$000(NetconfDeviceRpc.java:32) at org.opendaylight.controller.sal.connect.netconf.sal.NetconfDeviceRpc$1.apply(NetconfDeviceRpc.java:59) at org.opendaylight.controller.sal.connect.netconf.sal.NetconfDeviceRpc$1.apply(NetconfDeviceRpc.java:56) at com.google.common.util.concurrent.Futures$1.apply(Futures.java:720) at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:859) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:150) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:135) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185) at org.opendaylight.controller.sal.connect.netconf.listener.UncancellableFuture.set(UncancellableFuture.java:45) at org.opendaylight.controller.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:251) at org.opendaylight.controller.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:197) at org.opendaylight.controller.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:45) at org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:57) at org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:28) at org.opendaylight.protocol.framework.AbstractProtocolSession.channelRead0(AbstractProtocolSession.java:46) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32) at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) ... 1 more |
| Comments |
| Comment by Maros Marsalek [ 13/Nov/14 ] |
|
Hi Raghu, I just tested this and heres whats going on: The exception is saying that namespace urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi You installed the odl-netconf-connector-all feature and the loopback netconf-connector was configured and mountpoint was exposed into MD-SAL. Loopback netconf connector is part of the odl-netconf-connector-all feature. After some time(after the connector was successfully connected) you installed bgpcep features(from the namespace). And this caused the internal state of ODL to change. Some new modules were registered into the config subsystem and exposed over netconf northbound interface in ODL. The loopback netconf connector received the new/updated data but its schemaContext was outdated. The schema context is only built at the time the connection is esteblished. So the problem is that the whole ODL/config-sbusystem and netconf northbound are dynamic (changing as bundles appear) but the netconf connector is not. There is currently no mechanism to dynamically update the netconf-connector as it does not expect YANG schemas to change in the middle of a session. So you should install the odl-netconf-connector-all feature as the last one to spawn loopback netconf connector as the last piece to avoid the issue. |
| Comment by Maros Marsalek [ 13/Nov/14 ] |
|
Really "fixing" this would require our netconf server to send notifications about new yang schemas and the netconf client to implement some schema-refresh mechanism. |
| Comment by Raghurama Bhat [ 13/Nov/14 ] |
|
Since this is a special case scenario only for the Controller and not real devices, I guess the NETCONF spec probably will not cover this scenario. I am OK with you closing this out as not a bug |