[NETVIRT-847] NPE: the Function passed to Optional.transform() must not return null. Created: 13/Aug/17  Updated: 23/Aug/17  Resolved: 23/Aug/17

Status: Resolved
Project: netvirt
Component/s: General
Affects Version/s: Carbon
Fix Version/s: None

Type: Bug
Reporter: Sam Hague Assignee: Stephen Kitt
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8982

 Description   

https://logs.opendaylight.org/releng/jenkins092/netvirt-csit-1node-openstack-ocata-upstream-stateful-nitrogen/134/odl1_karaf.log.gz

2017-08-13 08:53:59,889 | ERROR | eChangeHandler-0 | RouterDpnChangeListener | 308 - org.opendaylight.netvirt.natservice-impl - 0.5.0.SNAPSHOT | removeSNATFromDPN : Exception while handling naptSwitch down for router b6d6ba4e-cbd8-4d2e-92ed-515a14ab81d3
java.lang.NullPointerException: the Function passed to Optional.transform() must not return null.
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:799)[27:com.google.guava:22.0.0]
at com.google.common.base.Present.transform(Present.java:76)[27:com.google.guava:22.0.0]
at org.opendaylight.netvirt.natservice.internal.NatUtil.getExtGwMacAddFromRouterId(NatUtil.java:1550)[308:org.opendaylight.netvirt.natservice-impl:0.5.0.SNAPSHOT]
at org.opendaylight.netvirt.natservice.internal.NaptSwitchHA.removeSnatFlowsInOldNaptSwitch(NaptSwitchHA.java:290)[308:org.opendaylight.netvirt.natservice-impl:0.5.0.SNAPSHOT]
at org.opendaylight.netvirt.natservice.internal.RouterDpnChangeListener.removeSNATFromDPN(RouterDpnChangeListener.java:416)[308:org.opendaylight.netvirt.natservice-impl:0.5.0.SNAPSHOT]
at org.opendaylight.netvirt.natservice.internal.RouterDpnChangeListener.remove(RouterDpnChangeListener.java:238)[308:org.opendaylight.netvirt.natservice-impl:0.5.0.SNAPSHOT]
at org.opendaylight.netvirt.natservice.internal.RouterDpnChangeListener.remove(RouterDpnChangeListener.java:46)[308:org.opendaylight.netvirt.natservice-impl:0.5.0.SNAPSHOT]
at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:150)[237:org.opendaylight.genius.mdsalutil-api:0.3.0.SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_141]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_141]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_141]



 Comments   
Comment by Sam Hague [ 13/Aug/17 ]

These are the two patches that were new in this job but I think the exception has been there for a while as [2] was a logging patch that bumped the exception from a debug to error so now it is coming out.

[1] https://git.opendaylight.org/gerrit/#/c/60554

[2] https://git.opendaylight.org/gerrit/#/c/61425

Comment by Stephen Kitt [ 16/Aug/17 ]

https://git.opendaylight.org/gerrit/59875 would fix this (along with a number of similar issues).

Comment by Stephen Kitt [ 16/Aug/17 ]

Cherry-picked to Nitrogen: https://git.opendaylight.org/gerrit/61831

Comment by Stephen Kitt [ 16/Aug/17 ]

Adapted for Carbon: https://git.opendaylight.org/gerrit/61873

Comment by Sam Hague [ 19/Aug/17 ]

nitrogen and master are merged. waiting for carbon.

Comment by A H [ 23/Aug/17 ]

A patch was submitted to revert the changes and fix this bug in Carbon SR2:

https://git.opendaylight.org/gerrit/#/c/61873/

To better assess the impact of this bug and fix, could someone from your team please help us identify the following:
Regression: Is this bug a regression of functionality/performance/feature compared to Carbon?
Severity: Could you elaborate on the severity of this bug? Is this a BLOCKER such that we cannot release Carbon SR2 without it?
Workaround: Is there a workaround such that we can write a release note instead?
Testing: Could you also elaborate on the testing of this patch? How extensively has this patch been tested? Is it covered by any unit tests or system tests?
Impact: Does this fix impact any dependent projects?

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