Skip to content

Commit d34b79c

Browse files
author
Alena Prokharchyk
committed
CLOUDSTACK-4573: fixed resource limit check when acquire public IP in VPC - update resource count for VPC public ip even when network_id is not set yet.
1 parent 9b81c91 commit d34b79c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎server/src/com/cloud/network/IpAddressManagerImpl.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ public void markPublicIpAsAllocated(IPAddressVO addr) {
820820
addr.getUuid());
821821
}
822822
// don't increment resource count for direct and dedicated ip addresses
823-
if (addr.getAssociatedWithNetworkId() != null && !isIpDedicated(addr)) {
823+
if ((addr.getAssociatedWithNetworkId() != null || addr.getVpcId() != null) && !isIpDedicated(addr)) {
824824
_resourceLimitMgr.incrementResourceCount(owner.getId(), ResourceType.public_ip);
825825
}
826826
}

0 commit comments

Comments
 (0)