Skip to content

Commit 778e04c

Browse files
author
Jayapal
committed
CLOUDSTACK-7104: perform ipassoc for ip when network is implemented after the gc
1 parent 1ed5546 commit 778e04c

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ private IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId) thr
420420
// 1.there is at least one public IP associated with the network on which first rule (PF/static NAT/LB) is being applied.
421421
// 2.last rule (PF/static NAT/LB) on the public IP has been revoked. So the public IP should not be associated with any provider
422422
boolean checkIfIpAssocRequired(Network network, boolean postApplyRules, List<PublicIp> publicIps) {
423+
424+
if (network.getState() == Network.State.Implementing) {
425+
return true;
426+
}
427+
423428
for (PublicIp ip : publicIps) {
424429
if (ip.isSourceNat()) {
425430
continue;

server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
11371137
loadBalancer.setState(backupState);
11381138
_lbDao.persist(loadBalancer);
11391139
CloudRuntimeException ex = new CloudRuntimeException("Failed to add specified loadbalancerruleid for vms "
1140-
+ instanceIds);
1140+
+ vmInstanceIds);
11411141
ex.addProxyObject(loadBalancer.getUuid(), "loadBalancerId");
11421142
// TBD: Also pack in the instanceIds in the exception using the
11431143
// right VO object or table name.

0 commit comments

Comments
 (0)