[NETCONF-122] mandatory descendant keepalive-executor/name Created: 11/Jan/16  Updated: 15/Mar/19  Resolved: 19/Jan/16

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

Type: Bug
Reporter: Vratko Polak Assignee: Tomas Cere
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: 4930

 Description   

In Beryllium CSIT, there is a test case which sends data [0].
This data does not contain keepalive-executor container. The container would have "type" field, which is explicitly set as not mandatory in [1], but it would also have a "name" field, which is inherited as mandatory from [2].

ODL resolves this situation as user error, as "name" is mandatory but not present in data.
This is possibly a netconf Bug, odl-sal-netconf-connector-cfg.yang should make sure keepalive-executor is not mandatory.

Looking at [3], this can be fixed by making keepalive-executor a presence container, in which case "type" may be kept mandatory.

Here is a piece of karaf.log:

Caused by: java.lang.IllegalArgumentException: Node (urn:opendaylight:params:xml:ns:yang:controller:config?revision=2013-04-05)configuration is missing mandatory descendant /(urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf?revision=2015-08-03)keepalive-executor/name
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)[39:com.google.guava:18.0.0]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.MandatoryLeafEnforcer$Strict.enforceOnTreeNode(MandatoryLeafEnforcer.java:58)[59:org.opendaylight.yangtools.yang-data-impl:0.8.0.SNAPSHOT]

[0] https://jenkins.opendaylight.org/releng/view/netconf/job/netconf-csit-1node-userfeatures-only-beryllium/lastSuccessfulBuild/robot/report/log.html#s1-s2-s1-t36-k2-k1-k2-k1-k3
[1] https://git.opendaylight.org/gerrit/gitweb?p=netconf.git;a=blob;f=opendaylight/netconf/sal-netconf-connector/src/main/yang/odl-sal-netconf-connector-cfg.yang;h=d903ccfa248f0a0409d2ae20c1a57b76fdf9ed49;hb=db7649383aa96be597a77f7a6da2b40be6fefc22#l171
[2] https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blob;f=opendaylight/config/config-api/src/main/yang/config.yang;h=e46d327ece9aff4e89ecf7ab0088561acb17c5aa;hb=37cbf86dd56fb1d79a817750951283e1ae688cf7#l131
[3] http://tools.ietf.org/html/rfc6020#section-7.6.5



 Comments   
Comment by Tomas Cere [ 14/Jan/16 ]

Currently config subsystem does not support presence containers at all.
The behavior in config is that once it sees that the type ref is not mandatory it expects that name is not present either, even if it still inherits mandatory true.
This is not true for md-sal which correctly enforces the mandatory statements.

Presence container would be the correct approach if cfg subsystem didn't have this limitation but since that is not the case in the meantime the solution will be to
make both type and name non-mandatory.

Comment by Tomas Cere [ 18/Jan/16 ]

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

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

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