[NETCONF-231] 'odl-netconf-topology' feature throws NullPointerException while mounting device[1.1.0-SNAPSHOT] Created: 20/Jul/16 Updated: 15/Mar/19 Resolved: 21/Jul/16 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | netconf |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Zhaoxing Li | Assignee: | Jakub Morvay |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| External issue ID: | 6239 |
| Priority: | High |
| Description |
|
Karaf log: , with config Node{getNodeId=Uri [_value=hcmount], augmentations={interface org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode=NetconfNode{getBetweenAttemptsTimeoutMillis=10000, getConcurrentRpcLimit=0, getConnectionTimeoutMillis=10000, getCredentials=LoginPassword{getPassword=admin, getUsername=admin, augmentations={}}, getDefaultRequestTimeoutMillis=10000, getHost=Host [_domainName=DomainName [_value=172.23.29.126]], getKeepaliveDelay=0, getMaxConnectionAttempts=10, getPort=PortNumber [_value=7777], getSchemaCacheDirectory=schema, getSleepFactor=1.5, isReconnectOnChangedSchema=false, isSchemaless=false, isTcpOnly=true}}} PUT operation: { ] After the NPE, there's nothing showing in the operational datastore, nor does the mount point exist. |
| Comments |
| Comment by Jakub Morvay [ 20/Jul/16 ] |
|
The problem seems to be in wrong type of host node, when we are getting the configuration for node from datastore. As you can see from your INFO log from AbstractNetconfTopology, we get the host node as domainName type. But we are expecting this node to be of ipAddress type. Not sure why is this happening, if this is problem in MD-SAL or Yangtools or where. Also, this bug is not always present, sometimes we get the host in ipAdress type, sometimes in domainName type. We should add support also for addressing devices via domain name in netconf-topology, but I don't think this will solve this bug. If we get IP address as Next thing, we can do in NETCONF is to somehow explicitly check host value and if it is valid IP address cast it to IP address, even if we get it as domain name. Do not know if we want such fixes in NETCONF project though.. |
| Comment by Zhaoxing Li [ 20/Jul/16 ] |
|
Just rebuilt everything and tried again. |
| Comment by Robert Varga [ 21/Jul/16 ] |
|
This regression was caused by https://git.opendaylight.org/gerrit/#/c/40056/. The problem was that UnionTypeCodec.create() used a temporary HashSet, which meant the order on constituent types was not retained. That in turn lead to the less-restrictive domain-name being tried first and succeeding. https://git.opendaylight.org/gerrit/#/c/42072/ fixed that. |