[NETCONF-138] RPC called on mount point not being correctly handled when multiple revision-date coexist Created: 01/Feb/16  Updated: 15/Mar/19  Resolved: 08/Feb/16

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

Type: Bug
Reporter: Alexis de Talhouët Assignee: Alexis de Talhouët
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 5175

 Description   

I have two netconf devices, having the same foo.yang schema but with different revision date.

device 1 has 2015-10-21
device 2 has 2015-11-07

foo.yang defines RPCs, one of them is download-image. Its definition is exactly the same in both revisions.
Both devices are correctly connected and there schema correctly mounted, present in the cache folder.

Calling the RPC on the mounted device failed because of unknown RPC.

Although I can clearly see the RPC listed under "available rpcs".

I believe RESTCONF implementation picked latest revision date for the given namespace.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Server Error</title>
</head>
<body>
<h2>HTTP ERROR 500</h2>
<p>Problem accessing /restconf/operations/network-topology:network-topology/topology/topology-netconf/node/netconf18475580502416/yang-ext:mount/foo:download-image. Reason:

<pre> Server Error</pre>
</p>
<h3>Caused by:</h3>
<pre>java.lang.NullPointerException: Unknown rpc (urn:foo:params:xml:ns:yang:foo?revision=2015-11-07)download-image, available rpcs: [(http://tail-f.com/ns/netconf/transactions/1.0?revision=1969-12-31)start-transaction, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)delete-config, (urn:foo:params:xml:ns:yang:foo?revision=2015-10-21)download-image-status, *(urn:foo:params:xml:ns:yang:foo?revision=2015-10-21)download-image*, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)cancel-commit, (http://tail-f.com/ns/netconf/transactions/1.0?revision=1969-12-31)abort-transaction, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)unlock, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)validate, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)kill-session, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)copy-config, (urn:ietf:params:xml:ns:netconf:notification:1.0?revision=2008-07-14)create-subscription, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)discard-changes, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get, (http://tail-f.com/ns/netconf/query?revision=2014-11-13)reset-query, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)edit-config, (http://tail-f.com/ns/netconf/query?revision=2014-11-13)stop-query, (urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?revision=2010-10-04)get-schema, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)close-session, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)get-config, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)lock, (http://tail-f.com/ns/netconf/query?revision=2014-11-13)fetch-query-result, (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)commit, (http://tail-f.com/ns/netconf/transactions/1.0?revision=1969-12-31)prepare-transaction, (http://tail-f.com/ns/netconf/query?revision=2014-11-13)start-query, (http://tail-f.com/ns/netconf/transactions/1.0?revision=1969-12-31)commit-transaction]
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:250)
at org.opendaylight.controller.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:211)
at org.opendaylight.controller.sal.connect.netconf.schema.mapping.NetconfMessageTransformer.toRpcRequest(NetconfMessageTransformer.java:71)
at org.opendaylight.controller.sal.connect.netconf.sal.NetconfDeviceRpc.invokeRpc(NetconfDeviceRpc.java:62)
at org.opendaylight.controller.sal.connect.netconf.sal.KeepaliveSalFacade$KeepaliveDOMRpcService.invokeRpc(KeepaliveSalFacade.java:249)
at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc(RestconfImpl.java:444)
at org.opendaylight.controller.sal.restconf.impl.StatisticsRestconfServiceWrapper.invokeRpc(StatisticsRestconfServiceWrapper.java:81)
at org.opendaylight.controller.sal.rest.impl.RestconfCompositeWrapper.invokeRpc(RestconfCompositeWrapper.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[...]
at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by Alexis de Talhouët [ 02/Feb/16 ]

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

Comment by Alexis de Talhouët [ 03/Feb/16 ]

beryllium --> https://git.opendaylight.org/gerrit/#/c/33982/
master --> https://git.opendaylight.org/gerrit/#/c/33983/

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