[NETCONF-498] Nitrogen snapshot fails to read device data via Draft18 Created: 16/Jan/18  Updated: 31/Jan/22  Resolved: 31/Jan/22

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Vratko Polak Assignee: Ivan Martiniak
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

manual testing


Attachments: File [NETCONF-498] Steps to reproduce.odt    

 Description   

Seen on karaf-0.7.2-20180115.004816-253.tar.gz

To reproduce:
Start ODL with odl-restconf and odl-netconf-topology.
Start testtool:

$ java -Xmx256M -Dorg.apache.sshd.registerBouncyCastle=false -jar netconf-testtool-1.3.1-executable.jar --device-count 1 --debug true --schemas-dir schema --md-sal true

(It does not really matter which models are in "schema" directory.)

Connect to the testtool:

$ curl -v -u admin:admin -H "Content-Type:application/json" -X PUT -d '{"netconf-topology:node":{"node-id":"netconf-test-device","netconf-node-topology:host":"127.0.0.11","netconf-node-topology:port":17830,"netconf-node-topology:username":"admin","netconf-node-topology:password":"admin","netconf-node-topology:tcp-only":false,"netconf-node-topology:keepalive-delay":0}}' http://127.0.0.1:8181/restconf/18/data/network-topology:network-topology/topology=topology-netconf/node=netconf-test-device ;echo

(I think Draft02 URL would work just as well.)

Wait until device is connected

$ curl -u admin:admin http://127.0.0.1:8181/restconf/18/data/network-topology:network-topology/topology=topology-netconf/node=netconf-test-device ;echo

(Search for "connected" instead of "connecting".)

Attempt to see the mounted data:

$ curl -u admin:admin http://127.0.0.1:8181/restconf/18/data/network-topology:network-topology/topology=topology-netconf/node=netconf-test-device/yang-ext:mount

You will see a long stacktrace. Draft02 can be used to verify the data can be read:

curl -u admin:admin http://127.0.0.1:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/netconf-test-device/yang-ext:mount ;echo

Using PUT and DELETE on Draft18 works, and http status returned confirms data is manipulated, it is just GET which fails.

The main reason for status 500 seem to be this exception:

java.lang.IllegalArgumentException: Could not find schema for node (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)data in EffectiveSchemaContext

And looking at karaf.log at debug level this seems to match with testtool response (about empty configuration data):

2018-01-11 19:13:42,135 | DEBUG | oupCloseable-6-1 | NetconfDeviceCommunicator | 310 - org.opendaylight.netconf.sal-netconf-connector - 1.6.2.SNAPSHOT | RemoteDevice{netconf-test-device}: Message received <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
<data/>
</rpc-reply>

Apparently, the <data> element is not unboxed properly.



 Comments   
Comment by Robert Varga [ 31/Jan/22 ]

This was probably fixed with NETCONF-853 or NETCONF-847.

Generated at Wed Feb 07 20:15:11 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.