diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java b/server/src/com/cloud/network/IpAddressManagerImpl.java index 1f789665523..016d297d41f 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); diff --git a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java index b6977c2808a..63150ebdc1b 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