Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-883

YANG parser fails to detect duplicate nodes in cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 2.0.7
    • None
    • parser
    • None

      Overview: When trying to add mvpn route to application peer, I get SchemaValidationFailedException. This route is copied from bgp loc-rib, so when sending this route from testtool directly, it appears correctly in bgp rib.

      Steps to reproduce.

      • Start latest karaf with odl-restconf odl-bgpcep-bgp and odl-bgpcep-bgp-config-example
      • configure app peer with provided script ./conf_app_peer.py
      • add route with script ./mvpn_add_route.py

      basically from error I gather that <intra-as-i-pmsi-a-d> cannot be child of <mvpn-route> which is invalid.

      ERROR from restconf: (also errors from karaf log in error.txt in attachements)

      <Response [500]>
      {"errors":{"error":[{"error-type":"application","error-tag":"operation-failed","error-message":"canCommit encountered an unexpected failure","error-info":"org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaValidationFailedException: Node (urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv4?revision=2018-04-17)mvpn-choice is not a valid child of (urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv4?revision=2018-04-17)mvpn-route[{(urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv4?revision=2018-04-17)route-key=AQwAAAAFAAAAAwoKCgo=, (urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv4?revision=2018-04-17)path-id=0}] according to the schema.\n\tat org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractNodeContainerModificationStrategy.verifyStructure(AbstractNodeContainerModificationStrategy.java:57)\n\tat org.opendaylight.yangtools.yang.data.impl.schema.tree.ListEntryModificationStrategy.verifyStructure(ListEntryModificationStrategy.java:32)\n\tat org.opendaylight.yangtools.yang.data.impl.schema.tree.ModifiedNode.seal(ModifiedNode.java:283)\n\tat org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractReadyIterator.process(AbstractReadyIterator.java:47)\n\tat org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeModification.ready(InMemoryDataTreeModification.java:285)\n\tat org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction.ready(SnapshotBackedWriteTransaction.java:151)\n\tat org.opendaylight.controller.cluster.datastore.LocalTransactionFactoryImpl.onTransactionReady(LocalTransactionFactoryImpl.java:86)\n\tat org.opendaylight.controller.cluster.datastore.LocalTransactionContext.ready(LocalTransactionContext.java:77)\n\tat org.opendaylight.controller.cluster.datastore.LocalTransactionContext.directCommit(LocalTransactionContext.java:88)\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy.getDirectCommitFuture(TransactionProxy.java:277)\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy.createSingleCommitCohort(TransactionProxy.java:264)\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy.ready(TransactionProxy.java:229)\n\tat org.opendaylight.controller.cluster.datastore.TransactionProxy.ready(TransactionProxy.java:54)\n\tat org.opendaylight.controller.cluster.databroker.AbstractDOMBrokerWriteTransaction.commit(AbstractDOMBrokerWriteTransaction.java:149)\n\tat org.opendaylight.controller.cluster.databroker.compat.LegacyDOMDataBrokerAdapter$DOMDataTransactionAdapter.commit(LegacyDOMDataBrokerAdapter.java:307)\n\tat org.opendaylight.controller.md.sal.common.api.data.AsyncWriteTransaction.submit(AsyncWriteTransaction.java:345)\n\tat org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.postDataViaTransaction(BrokerFacade.java:679)\n\tat org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.commitConfigurationDataPost(BrokerFacade.java:455)\n\tat org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.createConfigurationData(RestconfImpl.java:968)\n\tat org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.createConfigurationData(RestconfImpl.java:913)\n\tat org.opendaylight.netconf.sal.restconf.impl.StatisticsRestconfServiceWrapper.createConfigurationData(StatisticsRestconfServiceWrapper.java:157)\n\tat org.opendaylight.netconf.sal.rest.impl.RestconfCompositeWrapper.createConfigurationData(RestconfCompositeWrapper.java:92)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)\n\tat com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)\n\tat com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)\n\tat com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)\n\tat com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n\tat com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)\n\tat com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)\n\tat com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)\n\tat com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)\n\tat com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tat com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772)\n\tat org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:308)\n\tat org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:262)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)\n\tat org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)\n\tat org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)\n\tat org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)\n\tat org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)\n\tat org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)\n\tat org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)\n\tat org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)\n\tat org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)\n\tat org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)\n\tat org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)\n\tat org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)\n\tat org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)\n\tat org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)\n\tat org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)\n\tat org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)\n\tat org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)\n\tat org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:51)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)\n\tat org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:205)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)\n\tat org.opendaylight.aaa.filterchain.filters.CustomFilterAdapter.doFilter(CustomFilterAdapter.java:102)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\n\tat org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)\n\tat org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:534)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)\n\tat org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\n\tat java.lang.Thread.run(Thread.java:748)\n"}]}}
      

        1. conf_app_peer.py
          0.8 kB
        2. error.txt
          30 kB
        3. json_add_mvpn_route.py
          1 kB
        4. mvpn_add_route.py
          1 kB

            rovarga Robert Varga
            tomas.markovic Tomas Markovic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: