[YANGTOOLS-813] null module reference in relative leafref in openconfig model with deviation Created: 26/Sep/17 Updated: 10/Apr/22 Resolved: 06/Aug/18 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.5 |
| Type: | Bug | ||
| Reporter: | Giles Heron | Assignee: | Giles Heron |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 9214 |
| Description |
|
we're hitting a null module reference in an openconfig model (openconfig-interfaces). I'm seeing this in Carbon-SR1 and in Master. the device YANG model (openconfig-interfaces) has a deviation in IOS XR that impacts a leaf with a relative leafref in. The error we hit seems to be caused by a relative leafref. the deviation is: deviation /ocif:interfaces/ocif:interface/ocif:subinterfaces/ocif:subinterface/ocif:config/ocif:unnumbered { deviate not-supported; }that corresponds to this in the openconfig model: leaf unnumbered { description logs (from master - enhanced with extra debugs) attached. I added these lines in the relative leafref case in method getBaseTypeForLeafRef in SchemaContextUtil.java: LOG.debug("parent module {}", parentModule); these lines are getting triggered and show a null parent module (resulting from the previous line): Module parentModule = findParentModule(schemaContext, schema); |
| Comments |
| Comment by Giles Heron [ 26/Sep/17 ] |
|
added a few more logs. we're searching for the right module/revision. But seems that the schema context is incorrect as can't see openconfig-interfaces in there at all. Maybe we're looking in the controller context rather than the mounted context for some reason? |
| Comment by Peter Kajsa [ 27/Sep/17 ] |
|
I'm sorry, but I don't see any logs attached. Please can you attach them. Thanks. |
| Comment by Giles Heron [ 27/Sep/17 ] |
|
Attachment error.log has been added with description: log snippet |
| Comment by Peter Kajsa [ 03/Oct/17 ] |
|
I have been testing this issue in different ways from yangtools point of view, but it always works fine as far as Yangtools is concerned. Target of leafref is resolved correctly and base type for leafref is also resolved correctly. Maybe there is some problem before yangtools.. or are we sure there are not any other deviations (except the mentioned cisco-xr-openconfig-interfaces-deviations.yang) related to openconfig-interfaces module (especially that could affect leafref target in some way) ? |
| Comment by Peter Kajsa [ 11/Oct/17 ] |
|
I have discussed this issue with netconf guys and they have the following questions. Thanks. |
| Comment by Matthieu Cauffiez [ 14/Nov/17 ] |
|
Added hellomessage, karaf log and json answer |
| Comment by Robert Varga [ 20/Nov/17 ] |
|
The exception seems to point to incorrect data format: Caused by: java.lang.IllegalStateException: Schema for node with name ipv4 and namespace http://openconfig.net/yang/interfaces/ip doesn't exist. https://git.opendaylight.org/gerrit/65716 adds more information, we do need the XML content from the device. |
| Comment by Robert Varga [ 03/Aug/18 ] |
|
Giles, can you check if problem is still there? |
| Comment by Giles Heron [ 05/Aug/18 ] |
|
Looks good for me on Oxygen SR2. Less so if I go back to Carbon SR2. So I guess it's fixed |
| Comment by Balaji Varadaraju [ 02/Nov/18 ] |
|
Can I please know the exact gerrit patch that fixes this issue? I may need this for Carbon. Thanks. |
| Comment by Robert Varga [ 02/Nov/18 ] |
|
I don't have a clue, it must have been fixed as a side effect of some other issue. |