cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [2/3] git commit: updated refs/heads/internallb to 501f2ff
Date Wed, 17 Apr 2013 00:11:26 GMT
InternalLB: in VPC, restrict public LB to one tier only. Internal LB can be supported on multiple
tiers


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

Branch: refs/heads/internallb
Commit: 4d9a7dfd85f010918749dfe3166d75fe4db68d90
Parents: 8689bf9
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Tue Apr 16 16:03:32 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Tue Apr 16 16:42:13 2013 -0700

----------------------------------------------------------------------
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d9a7dfd/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index 06129e0..e38074d 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -115,7 +115,6 @@ import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.net.NetUtils;
-import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.ReservationContext;
 import com.cloud.vm.ReservationContextImpl;
 import com.cloud.vm.dao.DomainRouterDao;
@@ -179,7 +178,7 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager,
VpcProvis
     private final ScheduledExecutorService _executor = Executors.newScheduledThreadPool(1,
new NamedThreadFactory("VpcChecker"));
     private List<VpcProvider> vpcElements = null;
     private final List<Service> nonSupportedServices = Arrays.asList(Service.SecurityGroup,
Service.Firewall);
-    private final List<Provider> supportedProviders = Arrays.asList(Provider.VPCVirtualRouter,
Provider.NiciraNvp);
+    private final List<Provider> supportedProviders = Arrays.asList(Provider.VPCVirtualRouter,
Provider.NiciraNvp, Provider.InternalLbVm);
  
     int _cleanupInterval;
     int _maxNetworks;
@@ -1034,16 +1033,17 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager,
VpcProvis
             }
         }
 
-        //4) Only one network in the VPC can support LB
-        if (_ntwkModel.areServicesSupportedByNetworkOffering(guestNtwkOff.getId(), Service.Lb))
{
+        //4) Only one network in the VPC can support public LB inside the VPC. Internal LB
can be supported on multiple VPC tiers
+        if (_ntwkModel.areServicesSupportedByNetworkOffering(guestNtwkOff.getId(), Service.Lb)
&& guestNtwkOff.getPublicLb()) {
             List<? extends Network> networks = getVpcNetworks(vpc.getId());
             for (Network network : networks) {
                 if (networkId != null && network.getId() == networkId.longValue())
{
                     //skip my own network
                     continue;
                 } else {
-                    if (_ntwkModel.areServicesSupportedInNetwork(network.getId(), Service.Lb))
{
-                        throw new InvalidParameterValueException("LB service is already supported
" +
+                    NetworkOffering otherOff = _configMgr.getNetworkOffering(network.getNetworkOfferingId());
+                    if (_ntwkModel.areServicesSupportedInNetwork(network.getId(), Service.Lb)
&& otherOff.getPublicLb()) {
+                        throw new InvalidParameterValueException("Public LB service is already
supported " +
                         		"by network " + network + " in VPC " + vpc);
                     }
                 }


Mime
View raw message