Repository: cloudstack
Updated Branches:
  refs/heads/master 53d5e8af1 -> 320125125


ccp should not check public ip resource when deploy a vm on shared network


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

Branch: refs/heads/master
Commit: 3201251256817a44b4046c77c170fa82267e3fc3
Parents: 53d5e8a
Author: Anthony Xu <[email protected]>
Authored: Thu Oct 2 16:02:33 2014 -0700
Committer: Anthony Xu <[email protected]>
Committed: Thu Oct 2 16:03:34 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/network/IpAddressManagerImpl.java           | 2 +-
 server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/32012512/server/src/com/cloud/network/IpAddressManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java 
b/server/src/com/cloud/network/IpAddressManagerImpl.java
index 1f78966..016d297 100644
--- a/server/src/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/com/cloud/network/IpAddressManagerImpl.java
@@ -758,7 +758,7 @@ public class IpAddressManagerImpl extends ManagerBase 
implements IpAddressManage
 
         assert (addrs.size() == 1) : "Return size is incorrect: " + 
addrs.size();
 
-        if (!fetchFromDedicatedRange) {
+        if (!fetchFromDedicatedRange && 
VlanType.VirtualNetwork.equals(vlanUse)) {
             // Check that the maximum number of public IPs for the given 
accountId will not be exceeded
             try {
                 _resourceLimitMgr.checkResourceLimit(owner, 
ResourceType.public_ip);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/32012512/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java 
b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
index b6977c2..63150eb 100755
--- a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
+++ b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
@@ -425,7 +425,9 @@ public class ResourceLimitManagerImpl extends ManagerBase 
implements ResourceLim
                             "Maximum number of resources of type '" + type + 
"' for project name=" + projectFinal.getName() + " in domain id=" + 
account.getDomainId() +
                                 " has been exceeded.";
                 }
-                throw new ResourceAllocationException(message, type);
+                ResourceAllocationException e=  new 
ResourceAllocationException(message, type);;
+                s_logger.error(message, e);
+                throw e;
             }
 
             // check all domains in the account's domain hierarchy

Reply via email to