[NETCONF-512] 8040 code cannot serialize Leaf Lists Created: 23/Feb/18  Updated: 04/Sep/18  Resolved: 04/Sep/18

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: Nitrogen SR1
Fix Version/s: Oxygen SR4

Type: Bug Priority: High
Reporter: Anton Ivanov Assignee: Tom Pantelis
Resolution: Done Votes: 0
Labels: need_new_patch, patch_merged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

I am feeding it via json rpc, but this should blow up on anything else. It should not be difficult to concoct a test model and feed it to it.



 Description   

The 8040 code blows up when fed an object with a leaf list.

It reaches line 624 in ReadDataTransactionUtil.java which is "I do not know this type of node, I give up".

Looking at the code leaf-list type which in YangTools is called LeafSetNode is missing as an option in the preceding conditional in private static NormalizedNode<?, ?> prepareData



 Comments   
Comment by Anton Ivanov [ 23/Feb/18 ]

Just confirmed - it blows up on an internal ODL model with leaf-lists as well.

Comment by Tom Pantelis [ 24/Feb/18 ]

Submitted https://git.opendaylight.org/gerrit/#/c/68651

Comment by Kit Lou [ 27/Feb/18 ]

Please cherry pick 68651 to the oxygen branch and get a +2.  Thanks!

Comment by Robert Varga [ 27/Feb/18 ]

Oxygen: https://git.opendaylight.org/gerrit/#/c/68829/

Comment by Anton Ivanov [ 08/Mar/18 ]

This still breaks.

Tested with both leaf-list of integers and leaf list of strings.

018-03-08T13:08:54,596 | ERROR | qtp1530458632-110 | ContainerResponse | 38 - com.sun.jersey.jersey-server - 1.17.0 | Mapped exception to response: 500 (Internal Server Error)
org.opendaylight.restconf.common.errors.RestconfDocumentedException: errors: [RestconfError [error-type: application, error-tag: operation-failed, error-message: Unexpected node type: org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafSetEntryNodeBuilder$ImmutableLeafSetEntryNode]]
at org.opendaylight.restconf.nb.rfc8040.rests.utils.ReadDataTransactionUtil.prepareData(ReadDataTransactionUtil.java:668) ~[287:org.opendaylight.netconf.restconf-nb-rfc8040:1.7.0.SNAPSHOT]
1:09 PM

 

This is for: a piece of data which contians "dell-interface:untagged-ports": ["e101-001-0", "e101-002-0"].

Comment by Robert Varga [ 08/Mar/18 ]

I do not this is a release blocker – it is not a regression, is it?

Comment by Anton Ivanov [ 08/Mar/18 ]

I am not sure it is a regression. It may have always been there - it happens ONLY if you do not specify which store you want and ODL starts to merge config and operational views.

tpantelis is looking into it.

I do not think it is a blocker as there is a workaround - specify ?content=config or ?content=operational at the end of the URI. If you specify those - it all works as advertised.

It is up to Releng to decide if they want to patch this fully or leave the merge of views functionality till SR1 and Fluorine respectively.

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