Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-498

Nitrogen snapshot fails to read device data via Draft18

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Cannot Reproduce
    • None
    • None
    • restconf-nb
    • None
    • manual testing

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ivanm1996 Ivan Martiniak
            vrpolak Vratko Polak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: