[CONTROLLER-732] no models mounted when YANG schema not retrieved Created: 26/Aug/14  Updated: 25/Jul/23  Resolved: 03/Sep/14

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Giles Heron Assignee: Maros Marsalek
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC


Attachments: Zip Archive opendaylight.zip     Zip Archive opendaylight.zip    
Issue Links:
Duplicate
is duplicated by CONTROLLER-718 Netconf client fails after server doe... Resolved
External issue ID: 1622

 Description   

older builds of ODL (e.g. the one I have from July 29th) simply give a WARN message when a YANG schema isn't successfully retrieved.

parsing then continues.

the latest builds, however, stop parsing at that point:

2014-08-26 14:55:35.047 BST [nettyThreadgroupModule$NioEventLoopGroupCloseable-5-1] TRACE o.o.c.n.n.h.NetconfMessageToXMLEncoder - Sent to encode : <rpc message-id="m-1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-schema xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
<identifier>Cisco-IOS-XR-qos-ma-oper-sub2</identifier>
<version>2013-07-22</version>
<format>yang</format>
</get-schema>
</rpc>

2014-08-26 14:55:35.049 BST [nettyThreadgroupModule$NioEventLoopGroupCloseable-5-1] TRACE o.o.c.n.n.h.NetconfXMLToMessageDecoder - Received to decode: 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0a3c7270632d7265706c79206d6573736167652d69643d226d2d312220786d6c6e733d2275726e3a696574663a706172616d733a786d6c3a6e733a6e6574636f6e663a626173653a312e30223e0a203c7270632d6572726f723e0a20203c6572726f722d747970653e6170706c69636174696f6e3c2f6572726f722d747970653e0a20203c6572726f722d7461673e6f7065726174696f6e2d6661696c65643c2f6572726f722d7461673e0a20203c6572726f722d73657665726974793e6572726f723c2f6572726f722d73657665726974793e0a203c2f7270632d6572726f723e0a3c2f7270632d7265706c793e0a
2014-08-26 14:55:35.050 BST [nettyThreadgroupModule$NioEventLoopGroupCloseable-5-1] DEBUG o.o.c.n.n.AbstractNetconfSession - handling incoming message
2014-08-26 14:55:35.053 BST [nettyThreadgroupModule$NioEventLoopGroupCloseable-5-1] WARN o.o.c.s.c.n.l.NetconfDeviceCommunicator - RemoteDevice

{XRa}: Error reply from remote device, request: <rpc message-id="m-1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-schema xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
<identifier>Cisco-IOS-XR-qos-ma-oper-sub2</identifier>
<version>2013-07-22</version>
<format>yang</format>
</get-schema>
</rpc>
, response: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
<rpc-error>
<error-type>application</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>error</error-severity>
</rpc-error>
</rpc-reply>

org.opendaylight.controller.netconf.api.NetconfDocumentedException:
at org.opendaylight.controller.netconf.api.NetconfDocumentedException.fromXMLDocument(NetconfDocumentedException.java:236) ~[bundlefile:na]
at org.opendaylight.controller.sal.connect.netconf.util.NetconfMessageTransformUtil.checkSuccessReply(NetconfMessageTransformUtil.java:148) ~[bundlefile:na]
at org.opendaylight.controller.sal.connect.netconf.listener.NetconfDeviceCommunicator.processMessage(NetconfDeviceCommunicator.java:240) [bundlefile:na]
at org.opendaylight.controller.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:197) [bundlefile:na]
at org.opendaylight.controller.sal.connect.netconf.listener.NetconfDeviceCommunicator.onMessage(NetconfDeviceCommunicator.java:45) [bundlefile:na]
at org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:57) [bundlefile:na]
at org.opendaylight.controller.netconf.nettyutil.AbstractNetconfSession.handleMessage(AbstractNetconfSession.java:28) [bundlefile:na]
at org.opendaylight.protocol.framework.AbstractProtocolSession.channelRead0(AbstractProtocolSession.java:46) [bundlefile:na]
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:103) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:341) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:327) [bundlefile:4.0.19.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:341) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:327) [bundlefile:4.0.19.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:341) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext.access$700(DefaultChannelHandlerContext.java:30) [bundlefile:4.0.19.Final]
at io.netty.channel.DefaultChannelHandlerContext$8.run(DefaultChannelHandlerContext.java:332) [bundlefile:4.0.19.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:370) [bundlefile:4.0.19.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353) [bundlefile:4.0.19.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [bundlefile:4.0.19.Final]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
2014-08-26 14:55:35.054 BST [nettyThreadgroupModule$NioEventLoopGroupCloseable-5-1] WARN o.o.c.s.c.n.s.NetconfRemoteSchemaYangSourceProvider - RemoteDevice{XRa}

: YANG schema was not successfully retrieved for SourceIdentifier [name=Cisco-IOS-XR-qos-ma-oper-sub2@2013-07-22]. Errors: [RpcError [message=, severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=, cause=null]]

Zipped logs for old and new versions attached.



 Comments   
Comment by Giles Heron [ 26/Aug/14 ]

Attachment opendaylight.zip has been added with description: zipped opendaylight logs (old and new versions of ODL)

Comment by Maros Marsalek [ 27/Aug/14 ]

https://git.opendaylight.org/gerrit/#/c/10374/

Comment by Giles Heron [ 28/Aug/14 ]

While the fix below enables ODL to get a bit further it still ends up dropping the NETCONF session without parsing the remaining modules.

will send logs.

Comment by Giles Heron [ 28/Aug/14 ]

Attachment opendaylight.zip has been added with description: zipped opendaylight.log showing new behaviour post the last fix.

Comment by Maros Marsalek [ 02/Sep/14 ]

Ok, so the Cisco-IOS-XR-qos-ma-oper-sub2@2013-07-22 module (not provided by XR) is now ignored. What happens next is:

1. Netconf-connector tries to parse models without the missing submodule.
2. SchemaResolutionException is thrown with unsatisfied imports: {SourceIdentifier [name=Cisco-IOS-XR-qos-ma-oper@2013-07-22]=[ModuleImportImpl [name=Cisco-IOS-XR-qos-ma-oper-sub2, revision=2013-07-22]]
3. Netconf-connector removes Cisco-IOS-XR-qos-ma-oper@2013-07-22 parent module from the reactor since it is unsatisfied and reattempts to parse again
4. All dependencies are now marked as satisfied
5. Schema parsing fails on: Error in module 'Cisco-IOS-XR-qos-ma-oper-sub1' at line 1: Unresolved belongs-to statement: Cisco-IOS-XR-qos-ma-oper

This problem should be caught at step 4 (dependency resolution). Looks like a problem in DependencyResolver.

Comment by Maros Marsalek [ 02/Sep/14 ]

Fixed in yangtools:

https://git.opendaylight.org/gerrit/#/c/10637/

Generated at Wed Feb 07 19:53:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.