mirror of https://github.com/apache/cloudstack.git
bug 7292: fixed assignig LB to non-source Nat ip address
status 7292: resolved fixed
This commit is contained in:
parent
b9fadd923b
commit
10fb2a0f39
|
|
@ -1162,13 +1162,6 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
throw new InvalidParameterValueException("Failed to assign to load balancer " + loadBalancerId + ", the load balancer was not found.");
|
||||
}
|
||||
|
||||
DomainRouterVO syncObject = _routerMgr.getRouter(loadBalancer.getIpAddress());
|
||||
if(syncObject == null){
|
||||
throw new InvalidParameterValueException("Failed to assign to load balancer " + loadBalancerId + ", the domain router was not found at "+loadBalancer.getIpAddress());
|
||||
}
|
||||
else{
|
||||
cmd.synchronizeCommand("Router", syncObject.getId());
|
||||
}
|
||||
|
||||
// Permission check...
|
||||
Account account = UserContext.current().getAccount();
|
||||
|
|
@ -1295,6 +1288,14 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
if (firewallRulesToApply.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//Sync on domR
|
||||
if(router == null){
|
||||
throw new InvalidParameterValueException("Failed to assign to load balancer " + loadBalancerId + ", the domain router was not found at " + loadBalancer.getIpAddress());
|
||||
}
|
||||
else{
|
||||
cmd.synchronizeCommand("Router", router.getId());
|
||||
}
|
||||
|
||||
IPAddressVO ipAddr = _ipAddressDao.findById(loadBalancer.getIpAddress());
|
||||
List<IPAddressVO> ipAddrs = listPublicIpAddressesInVirtualNetwork(accountId, ipAddr.getDataCenterId(), null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue