[NETVIRT-19] NullPointerException while deleting the interface from router. Created: 17/May/16  Updated: 08/Jun/16  Resolved: 08/Jun/16

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

Type: Bug
Reporter: Anil Vishnoi Assignee: Arthi Bhattacharjee
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: Text File karaf.log     File karaf.log.1.tar.gz     File karaf.log.2.tar.gz     Zip Archive offshore_karaf_0.5.0.zip    
External issue ID: 5894

 Description   

NetVirt throws following null pointer exception when subnet interface is deleted from the router.

2016-05-17 00:14:09,886 | ERROR | ntDispatcherImpl | EventDispatcher | 300 - org.opendaylight.netvirt.openstack.net-virt - 1.3.0.SNAPSHOT | Exception in dispatching event NorthboundEvent [handler=NEUTRON_PORT, action=DELETE, port=NeutronPort [portUUID=4066b3ea-463d-4ea1-8707-3c79e435ab43, networkUUID=b1b2becb-fd1c-49fe-bf7d-a2e031d3697b, name=, adminStateUp=true, status=ACTIVE, macAddress=FA:16:3E:1C:65:BB, fixedIPs=[Neutron_IPs

{ipAddress='1.1.1.1', subnetUUID='2ec1b0b2-b7f2-4dab-83d3-9c78656eb5ea'}

], deviceID=ddbcf2ea-4562-43e6-a32b-838529afab10, deviceOwner=network:router_interface, tenantID=d95c67e9dbc44002b9ea0d947e4deb83, securityGroups=[], bindinghostID=, bindingvnicType=normal, bindingvnicType=normal, portSecurityEnabled=null], subnet=null, router=null, routerInterface=null, floatingIP=null, network=null, loadBalancer=null, loadBalancerPool=null, loadBalancerPoolMember=null, neutronsecurityRule=null]
java.lang.NullPointerException
at org.opendaylight.netvirt.openstack.netvirt.impl.NeutronL3Adapter.cleanupFloatingIPRules(NeutronL3Adapter.java:1466)[300:org.opendaylight.netvirt.openstack.net-virt:1.3.0.SNAPSHOT]
at org.opendaylight.netvirt.openstack.netvirt.impl.NeutronL3Adapter.handleNeutronPortEvent(NeutronL3Adapter.java:444)[300:org.opendaylight.netvirt.openstack.net-virt:1.3.0.SNAPSHOT]
at org.opendaylight.netvirt.openstack.netvirt.PortHandler.doNeutronPortDeleted(PortHandler.java:127)[300:org.opendaylight.netvirt.openstack.net-virt:1.3.0.SNAPSHOT]
at org.opendaylight.netvirt.openstack.netvirt.PortHandler.processEvent(PortHandler.java:169)[300:org.opendaylight.netvirt.openstack.net-virt:1.3.0.SNAPSHOT]
at org.opendaylight.netvirt.openstack.netvirt.impl.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:95)[300:org.opendaylight.netvirt.openstack.net-virt:1.3.0.SNAPSHOT]
at org.opendaylight.netvirt.openstack.netvirt.impl.EventDispatcherImpl.access$200(EventDispatcherImpl.java:27)[300:org.opendaylight.netvirt.openstack.net-virt:1.3.0.SNAPSHOT]
at org.opendaylight.netvirt.openstack.netvirt.impl.EventDispatcherImpl$1.run(EventDispatcherImpl.java:56)[300:org.opendaylight.netvirt.openstack.net-virt:1.3.0.SNAPSHOT]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_91]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_91]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]

This actually causes delay in the flow removal and packet leaks across the subnets even after subnet interface is removed from the router. Above issue can be recreated using following steps (please enable L3)

(1) Create two network/subnet (SB1, SB2) and spawn one VM in each network (VM1, VM2)
(2) Create router
(3) Attach both the network to router
(4) Ping from VM1 to VM2, ping will be successful.
(5) Now keep the ping on from VM1 to VM2
(6) Remove the interface of subnet SB2 from router
(7) You will see ping between VM1 and VM2 is still going on, ideally it should stop immediately. It will stop after a minute or so.
(8) If you look at the karaf log, you can see the NPE exception mentioned above.

Karaf log is attached with the mail.



 Comments   
Comment by Anil Vishnoi [ 17/May/16 ]

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

Comment by Anil Vishnoi [ 17/May/16 ]

Attachment karaf.log.1.tar.gz has been added with description: karaf.log.1.tar.gz

Comment by Anil Vishnoi [ 17/May/16 ]

Attachment karaf.log.2.tar.gz has been added with description: karaf.log.2

Comment by Arthi Bhattacharjee [ 19/May/16 ]

Hi Anil,

Following are the steps I’ve followed:

(1) Downloaded latest Distribution (distribution karaf-0.5.0-20160518.060151-2309.tar.gz) and up the Karaf.
(2) Enabled L3 feature in etc/custom.properties.
(3) Stacked the control node.
(4) Created two networks (N1 and N2)
(5) Created router and interfaces for N1 and N2 added to the router.
(6) Created two VM instances for each network.
(7) Ping from VM1 to VM2, ping will be successful.
(8) Removed the interface of second subnet from router
(9) Ping stopped instantly but didn’t get Exception as mentioned in the bug.

Thus bug is not reproduced. Please confirm from your side as well.

Comment by Arthi Bhattacharjee [ 19/May/16 ]

Attachment offshore_karaf_0.5.0.zip has been added with description: Karaf log for reference

Comment by Arthi Bhattacharjee [ 01/Jun/16 ]

Anil,

By creating an external network, we can reproduce the bug. We have pushed a patch regarding this bug.

Comment by Anil Vishnoi [ 01/Jun/16 ]

Hi Arthi,

Please update the bug with the patch number, just for record.

Comment by Arthi Bhattacharjee [ 02/Jun/16 ]

Anil,

Following patch id is for the bug fixing.

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

Comment by Sam Hague [ 07/Jun/16 ]

b: https://git.opendaylight.org/gerrit/#/c/39945/

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