VPC: don't generate empty SetStaticRoute command during VR start when there are no static routes for the VPC

Conflicts:

	server/src/com/cloud/user/AccountManagerImpl.java
This commit is contained in:
Alena Prokharchyk 2012-06-27 10:31:15 -07:00
parent 09bd4e1725
commit 5ecdad7399
2 changed files with 5 additions and 3 deletions

View File

@ -810,7 +810,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;

View File

@ -599,8 +599,8 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
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;
s_logger.warn("Failed to release ip address " + ip + " as a part of account id=" + accountId + " clenaup");
accountCleanupNeeded = true;
}
}
}