[NETCONF-228] executing rpc get-config in netconf protocol by post errors Created: 19/Jul/16  Updated: 15/Mar/19  Resolved: 09/Aug/16

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

Type: Bug
Reporter: moon.lee Assignee: Jakub Toth
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Attachments: Text File karaf.log    
Issue Links:
Duplicate
is duplicated by NETCONF-229 executing rpc get-config in netconf p... Resolved
is duplicated by NETCONF-230 operations "get" and "get-config" are... Resolved
External issue ID: 6209

 Description   

when executing rpc get-config in netconf protocol, errors happen if ietf-netconf.yang has different revision between odl and device(e.g netopeer)

mehtod:
post

url:
http://localhost:8181/restconf/operations/...../ietf-netconf:get-config(get)



 Comments   
Comment by Ryan Goulding [ 19/Jul/16 ]

Can you please provide a karaf.log?

Comment by Jakub Morvay [ 19/Jul/16 ]

Can you also please provide what error exactly did you get?

Do you really need to call get-config operation explicitly through restconf?
Isn't accessing configuration data through restconf/config sufficient?

Comment by moon.lee [ 20/Jul/16 ]

(In reply to Jakub Morvay from comment #3)
> Can you also please provide what error exactly did you get?
>
> Do you really need to call get-config operation explicitly through restconf?
> Isn't accessing configuration data through restconf/config sufficient?

<p>Problem accessing /restconf/operations/network-topology:network-topology/topology/topology-netconf/node/turing/yang-ext:mount/ietf-netconf:get-config. Reason:
<pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.IllegalArgumentException: Schema node null does not allow children.
at org.opendaylight.yangtools.yang.data.impl.codec.SchemaTracker.<init>(SchemaTracker.java:86)
at org.opendaylight.yangtools.yang.data.impl.codec.SchemaTracker.create(SchemaTracker.java:125)
at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.<init>(JSONNormalizedNodeStreamWriter.java:48)
at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.createNestedWriter(JSONNormalizedNodeStreamWriter.java:184)
at org.opendaylight.controller.sal.rest.impl.NormalizedNodeJsonBodyWriter.createNormalizedNodeWriter(NormalizedNodeJsonBodyWriter.java:139)
at org.opendaylight.controller.sal.rest.impl.NormalizedNodeJsonBodyWriter.writeNormalizedNode(NormalizedNodeJsonBodyWriter.java:100)
at org.opendaylight.controller.sal.rest.impl.NormalizedNodeJsonBodyWriter.writeTo(NormalizedNodeJsonBodyWriter.java:78)
at org.opendaylight.controller.sal.rest.impl.NormalizedNodeJsonBodyWriter.writeTo(NormalizedNodeJsonBodyWriter.java:46)

Comment by moon.lee [ 20/Jul/16 ]

(In reply to Jakub Morvay from comment #3)
> Can you also please provide what error exactly did you get?
>
> Do you really need to call get-config operation explicitly through restconf?
> Isn't accessing configuration data through restconf/config sufficient?

yes, i need to call get-config operation through restconf to get multiple nodes informaton.

Comment by Jakub Morvay [ 20/Jul/16 ]

(In reply to moon.lee from comment #5)
> (In reply to Jakub Morvay from comment #3)
> > Can you also please provide what error exactly did you get?
> >
> > Do you really need to call get-config operation explicitly through restconf?
> > Isn't accessing configuration data through restconf/config sufficient?
>
> yes, i need to call get-config operation through restconf to get multiple
> nodes informaton.

Can please explain this multiple nodes information further?

I think POST to
/restconf/operations/network-topology:network-topology/topology/topology-netconf/node/turing/yang-ext:mount/ietf-netconf:get-config
should be conceptually the same thing as GET to
/restconf/config/network-topology:network-topology/topology/topology-netconf/node/turing/yang-ext:mount/

What revision of ietf-netconf module are you using? Why do you think this is caused by revision mismatch?

Comment by moon.lee [ 20/Jul/16 ]

(In reply to Jakub Morvay from comment #6)
> (In reply to moon.lee from comment #5)
> > (In reply to Jakub Morvay from comment #3)
> > > Can you also please provide what error exactly did you get?
> > >
> > > Do you really need to call get-config operation explicitly through restconf?
> > > Isn't accessing configuration data through restconf/config sufficient?
> >
> > yes, i need to call get-config operation through restconf to get multiple
> > nodes informaton.
>
> Can please explain this multiple nodes information further?
>
> I think POST to
> /restconf/operations/network-topology:network-topology/topology/topology-
> netconf/node/turing/yang-ext:mount/ietf-netconf:get-config
> should be conceptually the same thing as GET to
> /restconf/config/network-topology:network-topology/topology/topology-netconf/
> node/turing/yang-ext:mount/
>
> What revision of ietf-netconf module are you using? Why do you think this is
> caused by revision mismatch?

these two operations are not same. see NETCONF-230.

revision of ietf-netconf in odl is 2011-06-11, in netopeer I use is 2011-03-08

Comment by Jakub Morvay [ 25/Jul/16 ]

Does netopeer advertise ietf-netconf capability with revision 2011-03-08 in hello message?

Comment by moon.lee [ 25/Jul/16 ]

(In reply to Jakub Morvay from comment #8)
> Does netopeer advertise ietf-netconf capability with revision 2011-03-08 in
> hello message?

Yes,it advertises.

Comment by Jakub Morvay [ 25/Jul/16 ]

(In reply to moon.lee from comment #9)
> (In reply to Jakub Morvay from comment #8)
> > Does netopeer advertise ietf-netconf capability with revision 2011-03-08 in
> > hello message?
>
> Yes,it advertises.

In that case, you should be able to call even base netconf operations through restconf, so it looks something is broken.

Can you please provide us karaf.log, so we can have more information, what is really happening.

Comment by moon.lee [ 26/Jul/16 ]

Attachment karaf.log has been added with description: karaf.log

Comment by Martin Ciglan [ 26/Jul/16 ]

Hi

by looking at package names in log e.g:

org.opendaylight.controller.sal.rest.impl.NormalizedNodeJsonBodyWriter
you are using pre-Beryllium Restconf which is not supported anymore.
Can you please switch to stable Beryllium first and try again? Many thanks.

Best Regards

Martin

Comment by Ryan Goulding [ 03/Aug/16 ]

Is this supported in Boron? My apologies, I was on PTO for the call today and may have missed out on the conversation, still reviewing the minutes. It seems like something we ought to support going forward... I don't think that it is particular to pre-Beryllium as I believe this wont work in post-beryllium either...

Comment by Martin Ciglan [ 08/Aug/16 ]

Right.

We've managed to replicate this bug with latest code base and it seems to be a real issue. Given rpc get-config is not present in rpcs collection, even though ietf-netconf module is part of schema context.
We're currently investigating why this is happening and we'll keep you updated.
Bug reopen, set to critical back again.

Martin

Comment by Jakub Morvay [ 08/Aug/16 ]

Hi all,

If the device advertises ietf-netconf capability, you are able to call base netconf rpcs via restconf. Tested on master branch, Beryllium should behave in the same way.

Martin replicated this bug on ODL netconf northbound, not on mounted device.
Since this bug is about calling base netconf rpcs on mounted device, I am closing this bug.

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