[NETCONF-881] Device with augmented NETCONF monitoring response cannot be connected without models inside cache/schema Created: 31/May/22  Updated: 19/Jul/22  Resolved: 19/Jul/22

Status: Resolved
Project: netconf
Component/s: None
Affects Version/s: 2.0.0, 3.0.0, 2.0.16, 3.0.5
Fix Version/s: 4.0.0, 3.0.6

Type: Bug Priority: Medium
Reporter: Peter Suna Assignee: Sangwook Ha
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File logs.txt    
Issue Links:
Duplicate
is duplicated by NETCONF-885 ODL issue where mounting fails if dev... Resolved

 Description   

If NETCONF device provide response with augmented ietf-netconf-monitoring data, there is an only way how to create device EffectiveModelContext by adding required device models to cache/schema.

Due to unknown elements in response and default `strictParsing` set to true inside XmlParserStream:
https://github.com/opendaylight/netconf/blob/master/netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/NetconfUtil.java#L408

variable providedSources will be empty:
https://github.com/opendaylight/netconf/blob/master/netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/DeviceSourcesResolver.java#L56

And if device models are not available in cache/schema, this part will fail because no models will be provided:
https://github.com/opendaylight/netconf/blob/master/netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/NetconfDevice.java#L510

So device will be disconnected



 Comments   
Comment by Robert Varga [ 14/Jun/22 ]

There are two ways to fix this:
1. request specific leafs of netconf-state through a subtree filter, which will not include the augmentations
2. trim the resulting DOM tree so that it includes only nodes from ietf-netconf-monitoring namespace

Comment by Sangwook Ha [ 14/Jul/22 ]

101850 implements the second option - trimming DOM tree.
The first option is less compatible - e.g. Junos does not allow a subtree filter for the child nodes of schemas.

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