[TRNSPRTPCE-547] NetworkModelServiceImpl.deleteOpenRoadmnode() fails Created: 10/Oct/21  Updated: 10/Dec/21  Resolved: 19/Nov/21

Status: Verified
Project: transportpce
Component/s: General
Affects Version/s: None
Fix Version/s: Silicon, Phosphorus

Type: Bug Priority: Medium
Reporter: Robert Varga Assignee: Gilles Thouenon
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 2 days
Original Estimate: Not Specified

Issue Links:
Issue split
split from YANGTOOLS-1346 IAE in StatementContextBase.childCopy... Resolved

 Description   

We have an user report of:

21:17:57.862 ERROR [opendaylight-cluster-data-notification-dispatcher-58] member-1-shard-topology-operational: Error notifying listener org.opendaylight.mdsal.binding.dom.adapter.BindingDOMDataTreeChangeListenerAdapter@736c9cc9
java.lang.NullPointerException: null
        at org.opendaylight.transportpce.networkmodel.service.NetworkModelServiceImpl.deleteOpenRoadmnode(NetworkModelServiceImpl.java:230) ~[bundleFile:?]
        at org.opendaylight.transportpce.networkmodel.NetConfTopologyListener.onDataTreeChanged(NetConfTopologyListener.java:78) ~[bundleFile:?]

NPE is always a bug, because the receiver is not checking contract. There are a number of derefences and we do no have JDK17, so this needs further analysis as to where the null is coming from.



 Comments   
Comment by Gilles Thouenon [ 13/Oct/21 ]

This NPE appears when, for example, there is an attempt of connection to a NETCONF node that fails. Many reasons for that (bad netconf-node-topology:port for example). In such a case, the netconf-connection-status remains "connecting" (instead of "connected"), and all the TransportPCE business logic (addition of a node in PortMapping, in different topologies...) fails.
Without protection, when we disconnect the node, a NPE appears since no node exists in any TransportPCE datastore.
Nedd to add a protection to not trying to remove from TransportPCE datastores a node that does not exist.

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