cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [3/4] git commit: updated refs/heads/master to b6e212f
Date Sat, 05 Sep 2015 09:43:43 GMT
CLOUDSTACK-8759 - Fix guets nic allocation

   - When stopping/detroying a VPC router and creating a new one via the addition os a VM,
the networks are no plugged correctly
   - The ETH1 ends up with the IP of the guest nic, which remains down. This causes routes
problems and the VMs are not reachable via the pub IPs


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/53c9bb4d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/53c9bb4d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/53c9bb4d

Branch: refs/heads/master
Commit: 53c9bb4d387ddc298744879526a40d1d2ca4e394
Parents: 23d0f3f
Author: wilderrodrigues <wrodrigues@schubergphilis.com>
Authored: Thu Sep 3 09:38:56 2015 +0200
Committer: wilderrodrigues <wrodrigues@schubergphilis.com>
Committed: Thu Sep 3 09:38:56 2015 +0200

----------------------------------------------------------------------
 .../cloud/network/router/NetworkHelperImpl.java    | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/53c9bb4d/server/src/com/cloud/network/router/NetworkHelperImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/NetworkHelperImpl.java b/server/src/com/cloud/network/router/NetworkHelperImpl.java
index dd45e9f..62dd789 100644
--- a/server/src/com/cloud/network/router/NetworkHelperImpl.java
+++ b/server/src/com/cloud/network/router/NetworkHelperImpl.java
@@ -623,12 +623,7 @@ public class NetworkHelperImpl implements NetworkHelper {
 
         networks.put(controlConfig, new ArrayList<NicProfile>());
 
-        // 2) Guest Network
-        final LinkedHashMap<Network, List<? extends NicProfile>> guestNic = configureGuestNic(routerDeploymentDefinition);
-        // The guest nic has to be added after the Control Nic.
-        networks.putAll(guestNic);
-
-        // 3) Public network
+        // 2) Public network
         if (routerDeploymentDefinition.isPublicNetwork()) {
             s_logger.debug("Adding nic for Virtual Router in Public network ");
             // if source nat service is supported by the network, get the source
@@ -651,10 +646,7 @@ public class NetworkHelperImpl implements NetworkHelper {
                 defaultNic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(sourceNatIp.getVlanTag()));
                 defaultNic.setIsolationUri(IsolationType.Vlan.toUri(sourceNatIp.getVlanTag()));
             }
-            //If guest nic has already been addedd we will have 2 devices in the list.
-            if (networks.size() > 1) {
-                defaultNic.setDeviceId(2);
-            }
+
             final NetworkOffering publicOffering = _networkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemPublicNetwork).get(0);
             final List<? extends Network> publicNetworks = _networkMgr.setupNetwork(s_systemAccount,
publicOffering, routerDeploymentDefinition.getPlan(), null, null, false);
             final String publicIp = defaultNic.getIPv4Address();
@@ -668,6 +660,11 @@ public class NetworkHelperImpl implements NetworkHelper {
             networks.put(publicNetworks.get(0), new ArrayList<NicProfile>(Arrays.asList(defaultNic)));
         }
 
+        // 3) Guest Network
+        final LinkedHashMap<Network, List<? extends NicProfile>> guestNic = configureGuestNic(routerDeploymentDefinition);
+        // The guest nic has to be added after the Control and Public nics.
+        networks.putAll(guestNic);
+
         return networks;
     }
 


Mime
View raw message