Bug 8926: Fix instance doesn't get an IP after deployment 15/62015/1
authorSridhar Gaddam <sgaddam@redhat.com>
Fri, 18 Aug 2017 16:59:09 +0000 (22:29 +0530)
committerSam Hague <shague@redhat.com>
Sat, 19 Aug 2017 01:14:15 +0000 (01:14 +0000)
In a fresh multinode deployment with Controller node running
ODL + dhcp-agent and a Compute node, when we spawn a first VM
on the compute node, it was seen that VM does not acquire the
IPAddress.

On debugging, it turns out that the remote broadcast group
entries were not programmed on the Compute node. This is a
timing/sync issue between Netvirt (Elan) and GENIUS. The
bug description explains the issue in detail and this patch
addresses the issue.

Change-Id: Ifee63e13cf330dd3056468eba95e6451e173e30b
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
vpnservice/elanmanager/elanmanager-impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java

index 55c3c88e2a86c4954845967731140ac21347a719..3914d8e51c9ede25382a9774f4f803771d93884a 100644 (file)
@@ -678,8 +678,10 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
         // enty.
         // Add interface to the ElanInterfaceForwardingEntires Container
         createElanInterfaceTablesList(interfaceName, tx);
+        futures.add(ElanUtils.waitForTransactionToComplete(tx));
         if (interfaceInfo != null) {
-            installEntriesForFirstInterfaceonDpn(elanInstance, interfaceInfo, dpnInterfaces, isFirstInterfaceInDpn, tx);
+            installEntriesForFirstInterfaceonDpn(elanInstance, interfaceInfo, dpnInterfaces,
+                    isFirstInterfaceInDpn, null);
 
             // add the vlan provider interface to remote BC group for the elan
             // for internal vlan networks
@@ -690,7 +692,7 @@ public class ElanInterfaceManager extends AsyncDataTreeChangeListenerBase<ElanIn
                 }
             }
         }
-        futures.add(ElanUtils.waitForTransactionToComplete(tx));
+
         if (isFirstInterfaceInDpn && isVxlanNetworkOrVxlanSegment(elanInstance)) {
             //update the remote-DPNs remoteBC group entry with Tunnels
             LOG.trace("update remote bc group for elan {} on other DPNs for newly added dpn {}", elanInstance, dpId);