mirror of https://github.com/apache/cloudstack.git
VPC: don't generate empty SetStaticRoute command during VR start when there are no static routes for the VPC
This commit is contained in:
parent
c3213a4735
commit
e2fd2f7515
|
|
@ -814,7 +814,9 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
|
|||
|
||||
s_logger.debug("Found " + staticRouteProfiles.size() + " static routes to apply as a part of vpc route "
|
||||
+ router + " start");
|
||||
createStaticRouteCommands(staticRouteProfiles, router, cmds);
|
||||
if (!staticRouteProfiles.isEmpty()) {
|
||||
createStaticRouteCommands(staticRouteProfiles, router, cmds);
|
||||
}
|
||||
|
||||
//4) REPROGRAM GUEST NETWORK
|
||||
boolean reprogramGuestNtwks = true;
|
||||
|
|
|
|||
|
|
@ -594,16 +594,16 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
|||
}
|
||||
|
||||
if (vpcsDeleted) {
|
||||
// release ip addresses belonging to the account
|
||||
List<? extends IpAddress> ipsToRelease = _ipAddressDao.listByAccount(accountId);
|
||||
for (IpAddress ip : ipsToRelease) {
|
||||
s_logger.debug("Releasing ip " + ip + " as a part of account id=" + accountId + " cleanup");
|
||||
if (!_networkMgr.disassociatePublicIpAddress(ip.getId(), callerUserId, caller)) {
|
||||
s_logger.warn("Failed to release ip address " + ip + " as a part of account id=" + accountId + " clenaup");
|
||||
accountCleanupNeeded = true;
|
||||
// release ip addresses belonging to the account
|
||||
List<? extends IpAddress> ipsToRelease = _ipAddressDao.listByAccount(accountId);
|
||||
for (IpAddress ip : ipsToRelease) {
|
||||
s_logger.debug("Releasing ip " + ip + " as a part of account id=" + accountId + " cleanup");
|
||||
if (!_networkMgr.disassociatePublicIpAddress(ip.getId(), callerUserId, caller)) {
|
||||
s_logger.warn("Failed to release ip address " + ip + " as a part of account id=" + accountId + " clenaup");
|
||||
accountCleanupNeeded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// delete account specific Virtual vlans (belong to system Public Network) - only when networks are cleaned
|
||||
// up successfully
|
||||
|
|
|
|||
Loading…
Reference in New Issue