[CONTROLLER-509] Cannot discover netconf device Created: 27/May/14  Updated: 25/Jul/23  Resolved: 28/May/14

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

Type: Bug
Reporter: Adiseshu Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: All


Issue Links:
Duplicate
duplicates CONTROLLER-508 get-schema RPC invalid Resolved
External issue ID: 1080
Priority: Highest

 Description   

While trying to get a netconf based device recognized by ODL, it was found that the initial RPC request was as below

<rpc message-id="m-25" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <get-schema xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"> <version>2012-02-06</version> <identifier>ietf-netconf-notifications</identifier> <format>yang</format> </get-schema> </rpc>

After debugging on the device side, below is what works correctly on the device side

<rpc message-id="m-25" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <get-schema xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"> <identifier>ietf-netconf-notifications</identifier> <version>2012-02-06</version> <format>yang</format> </get-schema> </rpc>

Basically Identifier should be sent before the versiion. This was also confirmed by tail-f - who pointed to the rfc 6020 - section 7.13 - subsection 7.13.4

Below is the snippet from the ODL log when it fails

2014-05-22 14:48:40.131 EDT [nettyThreadgroupModule$NioEventLoopGroupCloseable-7-1] DEBUG o.o.c.n.u.h.NetconfMessageAggregato r - Message is complete. 2014-05-22 14:48:40.131 EDT [nettyThreadgroupModule$NioEventLoopGroupCloseable-7-1] DEBUG o.o.c.n.u.m.NetconfMessageFactory - Parsing message <rpc-reply message-id="m-25" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><rpc-error> <error-type>protocol</error-type> <error-tag>missing-element</error-tag> <error-severity>error</error-severity> <error-path xmlns:ncm="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"> /rpc/ncm:get-schema/ncm:identifier </error-path><error-info><bad-element>identifier</bad-element> </error-info> </rpc-error> </rpc-reply>


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