[NETVIRT-438] Cleanup Elan instances when a network is deleted Created: 19/Jan/17  Updated: 25/Jun/18  Resolved: 10/Mar/17

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

Type: Bug
Reporter: Sridhar Gaddam Assignee: Sridhar Gaddam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks NETVIRT-1112 associateRouter NullPointerException ... Resolved
External issue ID: 7601

 Description   

Currently after creating some resources and deleting them, the ELAN instance(s) that were created in this process are not getting cleaned up.

Steps to reproduce:
1. In a fresh installation create a tenant neutron network, subnet and router.
2. Associate the subnet to the neutron router.
3. In karaf cli, check the ELAN instances.
opendaylight-user@root>elan:show
4. You would see an ELAN instance created for the resources.
5. Now dissociate the tenant subnet from neutron router, delete the router, network and subnet.
6. Check elan instances.
You will see the same output as in Step 3 above.

Expected behavior:
The ELAN instances should have been deleted.

Along with this, the following exception is logged in karaf.
2017-01-17 16:30:12,135 | ERROR | pool-43-thread-1 | InterfacemgrProvider | 335 - org.opendaylight.genius.interfacemanager-impl - 0.1.2.Boron-SR2 | Interface b1c4af31-b2eb-4cb7-8aff-f67fdbd1e8ac is not present
Exception in thread "pool-43-thread-1" java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:964)
at java.util.Collections$SetFromMap.contains(Collections.java:5459)
at org.opendaylight.netvirt.neutronvpn.NeutronvpnUtils.isNetworkTypeSupported(NeutronvpnUtils.java:975)
at org.opendaylight.netvirt.neutronvpn.NeutronNetworkChangeListener.remove(NeutronNetworkChangeListener.java:101)
at org.opendaylight.netvirt.neutronvpn.NeutronNetworkChangeListener.remove(NeutronNetworkChangeListener.java:34)
at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:129)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by Sridhar Gaddam [ 19/Jan/17 ]

https://git.opendaylight.org/gerrit/#/c/50673/2

Comment by Sridhar Gaddam [ 24/Jan/17 ]

Additional notes: @Mike had a brief look at this issue to check if its networking-odl or neutron that is deleting the networkType() attribute prior to network delete event.

He narrowed down the issue to the following patch in Neutron that introduced this issue [3].
So the issue would be seen if we use stable/newton (or later).
[3] https://review.openstack.org/#/c/317358/

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