[YANGTOOLS-590] java.lang.RuntimeException: RemoteDevice{}: readOperationalData failed Created: 09/Mar/16  Updated: 10/Apr/22  Resolved: 12/May/16

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

Type: Bug
Reporter: Carol Sanders Assignee: Peter Kajsa
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: Zip Archive karaf.zip    
Issue Links:
Blocks
blocks YANGTOOLS-586 Regex processing of yang models is br... Resolved
Duplicate
is duplicated by YANGTOOLS-605 Incorrect parsing of annotated model Resolved
External issue ID: 5484

 Description   

The module exists on the netconf node and the yang file for that is successfully parsed and seen as available capabilities in netconf operational tree

HTTP ERROR 500

Problem accessing /restconf/config/network-topology:network-topology/topology/topology-netconf/node/vyatta-4.1/yang-ext:mount/vyatta-security-v1:security/. Reason:

Server Error

Caused by:

java.lang.RuntimeException: RemoteDevice

{vyatta-4.1}

: readOperationalData failed
at org.opendaylight.netconf.sal.connect.netconf.sal.tx.ReadOnlyTx.readWithTimeout(ReadOnlyTx.java:170)
at org.opendaylight.netconf.sal.connect.netconf.sal.tx.ReadOnlyTx.readConfigurationData(ReadOnlyTx.java:87)
at org.opendaylight.netconf.sal.connect.netconf.sal.tx.ReadOnlyTx.read(ReadOnlyTx.java:139)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.readDataViaTransaction(BrokerFacade.java:194)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.readConfigurationData(BrokerFacade.java:87)
at org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.readConfigurationData(RestconfImpl.java:663)
at org.opendaylight.netconf.sal.restconf.impl.StatisticsRestconfServiceWrapper.readConfigurationData(StatisticsRestconfServiceWrapper.java:95)
at org.opendaylight.netconf.sal.rest.impl.RestconfCompositeWrapper.readConfigurationData(RestconfCompositeWrapper.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)



 Comments   
Comment by Carol Sanders [ 09/Mar/16 ]

Additionally,
This device and version work in Li.

Comment by Jakub Morvay [ 10/Mar/16 ]

Hi Carol,

This server response with exception doesn't contain enough information to find the problem causing this error.

If it is possible and this stuff isn't confidential, can you also attach karaf log, device configuration and relevant yang schemas?

Or at least karaf's ERROR log related to this data read would be helpful.

Comment by Carol Sanders [ 10/Mar/16 ]

Attachment karaf.zip has been added with description: karaf.log

Comment by Jakub Morvay [ 14/Mar/16 ]

I checked provided log and it seems that this issue is not netconf related.

Log:
2016-03-08 22:58:33,901 | WARN | ssing-executor-9 | NetconfDevice | 228 - org.opendaylight.netconf.sal-netconf-connector - 1.3.0.Beryllium-RC2 | RemoteDevice

{vyatta-4.1}

: Unable to build schema context, unsatisfied imports

{SourceIdentifier [name=ietf-netconf-monitoring@2010-10-04]=[ModuleImportImpl [name=ietf-inet-types, revision=2010-09-24], ModuleImportImpl [name=ietf-yang-types, revision=2010-09-24]], SourceIdentifier [name=vyatta-interfaces-l2tpeth-v1@2015-08-14]=[ModuleImportImpl [name=vyatta-xconnect-v1, revision=null]]}

, will reattempt with resolved only

indicates that some modules are missing from device's schema context. Read error states that you want to read unknown nodes data (node firewall in container security). Is this node defined in vyatta-interfaces-l2tpeth-v1 module or its submodules?

Comment by Balaji Varadaraju [ 14/Mar/16 ]

Yes this module is defined. In addition we tested the same node on Lithium and it works fine. On Be, yang modules are resolved and shown in available capabilities in the operational store. However when we do a get on that, controller is unable to parse even though it's in resolved state. This looks like a regression from Li to Be.

Comment by Balaji Varadaraju [ 15/Mar/16 ]

I think we know the cause. One of the YANG files has pattern restrictions for the value.

If you see the pattern values are not enclosed in double quotes. When I enclose them in double quotes, we do not see the problem. But we see the issue when they are not. However on Li this is not an issue. Is this something changed in Be? Is the validation more strict in Be?

Also refer to this bug which is also related to patterns. ( Go to the end of comments section)

https://bugs.opendaylight.org/show_bug.cgi?id=5396

leaf vhost {
configd:help "Virtio vhost devices";
type union {
type types:interface-ifname

{ pattern dp[0-9]+vhost[0-9]+; }

type types:interface-ifname

{ pattern dp[0-9]+vhost[0-9]+\.[1-9][0-9]*; }

}
}

Comment by Peter Kajsa [ 15/Mar/16 ]

The new yang statement parser has been introduced in Beryllium release of Yang Tools. Pattern value should be enclosed in double quotes, since it may contains characters like ';','

{','}

' etc.

Comment by Balaji Varadaraju [ 15/Mar/16 ]

But the quotes are not mandatory if no escaping is required right. By making this mandatory we are artificially making it a requirement and hence are breaking files which may not have it. I don't think YANG specifications require quotes for patterns unless it needs escaping.

Comment by Peter Kajsa [ 22/Mar/16 ]

If an expression contains one of the following characters ('\r' | '\n' | '\t' | ' ' | ';' | '

{' | '"' | '\'' | '/' | '=' | '[' | ']' | '+' | '}

'), it must be enclosed in "" or ''.

Comment by Balaji Varadaraju [ 22/Mar/16 ]

Peter, Can you please take a look at this?
https://bugs.opendaylight.org/show_bug.cgi?id=5396

Regex processing seems to have broken in Be.

Comment by Tony Tkacik [ 22/Mar/16 ]

STRING definition in old parser (used in Lithium):

STRING: ((( '\r' | '\n' | '\t' | ' ' | ';' | '{' | '"' | '\'')( '\r' | '\n' | '\t' | ' ' | ';' | '{' )* ) | SUB_STRING ) ->popMode;

STRING definition in new parser:

STRING : ((~( '\r' | '\n' | '\t' | ' ' | ';' | '

{' | '"' | '\'' | '/' | '=' | '[' | ']' | '+' | '}

' )~( '\r' | '\n' |
'\t' | ' ' | ';' | '

{' | '/' | '=' | '[' | ']' | '}

')* ) | SUB_STRING );

Which adds additional characters such as =[]} to exclusion which does not seems correct.

Comment by Peter Kajsa [ 22/Mar/16 ]

Hmmm ok, I will discuss this issue with author of the grammar, maybe he had some reasons for this change (e.g. fix of a bug etc.).

Comment by Colin Dixon [ 24/Mar/16 ]

Any progress here?

Comment by Peter Kajsa [ 31/Mar/16 ]

We are trying to change current yang statement grammar to support such arguments and retest all yang models. Still in progress.

Comment by Peter Kajsa [ 28/Apr/16 ]

Yang lexer fix: https://git.opendaylight.org/gerrit/#/c/38190/
Please retest with this patch.

Comment by Robert Varga [ 29/Apr/16 ]

be: https://git.opendaylight.org/gerrit/#/c/38219/

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