[NETCONF-402] Apidoc explorer is broken after installing Boron SR3 Created: 20/Apr/17  Updated: 15/Mar/19  Resolved: 09/May/17

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

Type: Bug
Reporter: JALPA MODASIYA Assignee: Miroslav Kovac
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: PNG File RestconfUrl.PNG     PNG File karaflog.png    
External issue ID: 8266

 Comments   
Comment by JALPA MODASIYA [ 20/Apr/17 ]

Restconf url <controller-ip>:8181/apidoc/explorer/index.html giving 500 response code but I can get 200 response from http://<controller-ip>:8181/restconf/operational/opendaylight-inventory:nodes/

Comment by JALPA MODASIYA [ 20/Apr/17 ]

Attachment RestconfUrl.PNG has been added with description: Restconf url <controller-ip>:8181/apidoc/explorer/index.html giving 500 response code

Comment by JALPA MODASIYA [ 20/Apr/17 ]

Attachment karaflog.png has been added with description: Added karaf log

Comment by Ajay L [ 21/Apr/17 ]

Issue is seen only when BGP feature is installed (feature:install odl-bgpcep-bgp-all). Swagger doc generator barfs while processing openconfig-bgp-multiprotocol.yang. There has been no change in this model. Earlier Boron release is fine, so this is most likely a regression.

2017-04-21 16:21:35,590 | DEBUG | qtp1660493819-61 | ModelGenerator | 273 - org.opendaylight.netconf.sal-rest-docgen - 1.4.3.Boron-SR3 | >> processLeafRef: xPathString=../config/afi-safi-name
2017-04-21 16:21:35,590 | DEBUG | qtp1660493819-61 | ModelGenerator | 273 - org.opendaylight.netconf.sal-rest-docgen - 1.4.3.Boron-SR3 | >> processLeafRef: xPath=../config/afi-safi-name, isAbsolute=false
2017-04-21 16:21:35,590 | DEBUG | qtp1660493819-61 | ModelGenerator | 273 - org.opendaylight.netconf.sal-rest-docgen - 1.4.3.Boron-SR3 | >> processLeafRef: schemaNode=null
2017-04-21 16:21:35,593 | ERROR | qtp1660493819-61 | ContainerResponse | 133 - com.sun.jersey.jersey-server - 1.17.0 | The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.NullPointerException
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processLeafRef(ModelGenerator.java:527)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processTypeDef(ModelGenerator.java:478)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processLeafNode(ModelGenerator.java:433)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processChildren(ModelGenerator.java:320)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processDataNodeContainer(ModelGenerator.java:258)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processChildren(ModelGenerator.java:323)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processDataNodeContainer(ModelGenerator.java:258)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processChildren(ModelGenerator.java:340)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processDataNodeContainer(ModelGenerator.java:258)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processChildren(ModelGenerator.java:340)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processDataNodeContainer(ModelGenerator.java:258)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.processContainersAndLists(ModelGenerator.java:134)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ModelGenerator.convertToJsonSchema(ModelGenerator.java:116)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator.getSwaggerDocSpec(BaseYangSwaggerGenerator.java:238)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator.getApiDeclaration(BaseYangSwaggerGenerator.java:159)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator.getApiDeclaration(BaseYangSwaggerGenerator.java:152)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.BaseYangSwaggerGenerator.getResourceListing(BaseYangSwaggerGenerator.java:99)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ApiDocGenerator.getResourceListing(ApiDocGenerator.java:30)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]
at org.opendaylight.netconf.sal.rest.doc.impl.ApiDocServiceImpl.getRootDoc(ApiDocServiceImpl.java:56)[273:org.opendaylight.netconf.sal-rest-docgen:1.4.3.Boron-SR3]

Comment by Vratko Polak [ 25/Apr/17 ]

We now have an apidocs suite. It seems to detect this Bug in Boron all job [1], but not in only job (perhaps the enabling Yang model is not there).

[1] https://logs.opendaylight.org/releng/jenkins092/netconf-csit-1node-userfeatures-all-boron/548/archives/log.html.gz#s1-s2-s1-t1-k2

Comment by Vratko Polak [ 25/Apr/17 ]

Visible on Carbon all job [2] as well.

[2] https://logs.opendaylight.org/releng/jenkins092/netconf-csit-1node-userfeatures-all-carbon/246/archives/log.html.gz#s1-s2-s1-t1-k2

Comment by Miroslav Kovac [ 25/Apr/17 ]

In yangtools SchemaContextUtil.findDataSchemaNodeForRelativeXPath returns null on openconfig-bgp-multiprotocol.yang leafref->

leaf afi-safi-name {
type leafref

{ path "../config/afi-safi-name"; }

description
"Reference to the AFI-SAFI name used as a key
for the AFI-SAFI list";
}

which is not correct in this case

moving this bug to yangtools

Comment by Vratko Polak [ 26/Apr/17 ]

> moving this bug to yangtools

NETCONF-410 created for the apidoc reaction.

Comment by Peter Kajsa [ 27/Apr/17 ]

Based on performed investigation it seems that Restconf is passing incorrect arguments to the method SchemaContextUtil.findDataSchemaNodeForRelativeXPath and so it returns null. Therefore I am moving this bug back to the Restconf.

In more details, actual schema node (LeafEffectiveStatementImpl[qname=(http://openconfig.net/yang/bgp?revision=2015-10-09)afi-safi-name, path=AbsoluteSchemaPath

{path=[(http://openconfig.net/yang/bgp?revision=2015-10-09)bgp, (http://openconfig.net/yang/bgp?revision=2015-10-09)global, (http://openconfig.net/yang/bgp?revision=2015-10-09)afi-safis, (http://openconfig.net/yang/bgp?revision=2015-10-09)afi-safi, (http://openconfig.net/yang/bgp?revision=2015-10-09)afi-safi-name]}

])
and actual module (openconfig-bgp-multiprotocol.yang) does not match.

Comment by Miroslav Kovac [ 28/Apr/17 ]

master fix -> https://git.opendaylight.org/gerrit/#/c/56240/ this will be cherry-picked to carbon as soon as merged in master

Comment by Miroslav Kovac [ 02/May/17 ]

Hello since there is just target for carbon sr1. This is cherry picked just to stable/carbon. But the name of this bug is - Apidoc explorer is broken after installing Boron SR3 - I want to ask if you need this for boron too.
Thank you

carbon patch -> https://git.opendaylight.org/gerrit/#/c/56371/

Comment by Miroslav Kovac [ 02/May/17 ]

new fix was created for nitrogen will be cherry picked to carbon and possibly to boron -> https://git.opendaylight.org/gerrit/#/c/56386/

old one caused a faulty leafref resolving in some of the yang files.
Still waiting to confirmation if you need this also in boron.

Comment by Miroslav Kovac [ 03/May/17 ]

stable/carbon -> https://git.opendaylight.org/gerrit/#/c/56425/

Comment by Ivan Hrasko [ 09/May/17 ]

cherry picked to stable/boron: https://git.opendaylight.org/gerrit/#/c/56386/

because:
https://jenkins.opendaylight.org/releng/view/netconf/job/netconf-csit-1node-userfeatures-all-boron/562/robot/report/log.html#s1-s2-s1

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