Updated to call bind/unbind from ACL interface state listener to avoid 24/65924/2
authorShashidhar Raja <shashidharr@altencalsoftlabs.com>
Mon, 27 Nov 2017 07:47:48 +0000 (13:17 +0530)
committerSam Hague <shague@redhat.com>
Tue, 5 Dec 2017 21:23:39 +0000 (21:23 +0000)
stale flows during VM migration

Change-Id: I4b61f96b0672e4a70160926d762510f665eb7732
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
vpnservice/aclservice/impl/src/main/java/org/opendaylight/netvirt/aclservice/listeners/AclInterfaceStateListener.java
vpnservice/aclservice/impl/src/test/java/org/opendaylight/netvirt/aclservice/tests/FlowEntryObjectsStateful.xtend

index a60f8c5674c23ff9f76eceddbc71936139462b83..1726fee62ae93f610f661c27c32da33bd7fcbbfd 100644 (file)
@@ -82,6 +82,7 @@ public class AclInterfaceStateListener extends AsyncDataTreeChangeListenerBase<I
         if (AclServiceUtils.isOfInterest(aclInterface)) {
             if (aclClusterUtil.isEntityOwner()) {
                 LOG.debug("On remove event, notify ACL service manager to remove ACL from interface: {}", aclInterface);
+                aclServiceManger.notify(aclInterface, null, Action.UNBIND);
                 aclServiceManger.notify(aclInterface, null, Action.REMOVE);
             }
             List<Uuid> aclList = aclInterface.getSecurityGroups();
@@ -150,6 +151,7 @@ public class AclInterfaceStateListener extends AsyncDataTreeChangeListenerBase<I
             }
             if (aclClusterUtil.isEntityOwner()) {
                 LOG.debug("On add event, notify ACL service manager to add ACL for interface: {}", aclInterface);
+                aclServiceManger.notify(aclInterface, null, Action.BIND);
                 aclServiceManger.notify(aclInterface, null, Action.ADD);
             }
         }
index 3e62b0b5603b6072d755c884ed30d012e73196e3..ac6ea54af3b1f5f98c1f3ee1906536f19624ee19 100644 (file)
@@ -58,6 +58,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
         + fixedConntrackEgressFlowsPort2
         + etheregressFlowPort2
         + remoteFlows
+        + remoteFlows
     }
 
     protected def tcpFlows() {
@@ -78,6 +79,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
         + tcpEgressFlowPort2
         + tcpEgressFlowPort2
         + remoteFlows
+        + remoteFlows
     }
 
     protected def udpFlows() {
@@ -98,6 +100,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
         + fixedConntrackEgressFlowsPort2
         + udpEgressFlowsPort2
         + remoteFlows
+        + remoteFlows
     }
 
     protected def icmpFlows() {
@@ -118,6 +121,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
         + icmpEgressFlowsPort2
         + icmpEgressFlowsPort2
         + remoteFlows
+        + remoteFlows
     }
 
     protected def dstRangeFlows() {
@@ -159,6 +163,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
     protected def aapFlows() {
         icmpFlows()
         + aapRemoteFlowsPort1
+        + aapRemoteFlowsPort1
         + aapFlowsPort2
     }
 
@@ -194,6 +199,7 @@ class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
         + etherIngressFlowsPort1WithRemoteIpSg("10.0.0.1", "ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7")
         + etherIngressFlowsPort1WithRemoteIpSg("10.0.0.2", "ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7")
         + etherIngressFlowsPort2WithRemoteIpSg()
+        + remoteFlows
     }
 
     protected def etherIngressFlowsPort1WithRemoteIpSg(String ip, String theFlowId) {