Bug 4733 - impl/SecurityServicesImpl.java: null pointer exception
This patch masks the following null pointer exception.
The code assumes that there is always nodes(ovs switch) corresponding to
neutron port always exists. But this is not always true because there are
race conditions and some tempests tests only run neutron without nova.
So the code shouldn't assume that nodes always exists and also external
attributes in ovsdb always exists. The latter case will be addressed by
another patch.
NOTE: this patch only addresses null pointer exception. The race condition
should be handled somehow later.
> 2015-12-03 18:48:15,562 | ERROR | ntDispatcherImpl | TenantNetworkManagerImpl | 267 - org.opendaylight.ovsdb.openstack.net-virt - 1.2.1.SNAPSHOT | Exception during handlingNeutron network delete
> java.lang.NullPointerException
> at org.opendaylight.ovsdb.openstack.netvirt.impl.SouthboundImpl.extractTerminationPointAugmentations(SouthboundImpl.java:482)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.impl.SouthboundImpl.getTerminationPointsOfBridge(SouthboundImpl.java:437)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.impl.SecurityServicesImpl.getInterface(SecurityServicesImpl.java:435)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.impl.SecurityServicesImpl.syncSecurityRule(SecurityServicesImpl.java:371)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.PortSecurityHandler.syncSecurityGroup(PortSecurityHandler.java:165)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.PortSecurityHandler.processNeutronSecurityRuleAdded(PortSecurityHandler.java:144)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.PortSecurityHandler.processEvent(PortSecurityHandler.java:130)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:94)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.access$200(EventDispatcherImpl.java:27)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl$1.run(EventDispatcherImpl.java:56)[267:org.opendaylight.ovsdb.openstack.net-virt:1.2.1.SNAPSHOT]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_45-internal]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_45-internal]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_45-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_45-internal]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_45-internal]
Change-Id: I37e0a72c4bc4361b678f748bf1df6c926c101cb1
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>