mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5667: Shared Network - fails to launch router due to "
Multiple generic soure NAT IPs provided for network" 'getExistingSourceNatInNetwork' method was retruning source nat ip for a particular account, resulting in multiple source nat ip's to be assigned to a shared network on network implemen. Fix ensures that account id is not considered for shared network implement.
This commit is contained in:
parent
c1101eb695
commit
14241ce233
|
|
@ -1105,8 +1105,14 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
|
|||
}
|
||||
|
||||
protected IPAddressVO getExistingSourceNatInNetwork(long ownerId, Long networkId) {
|
||||
|
||||
List<? extends IpAddress> addrs = _networkModel.listPublicIpsAssignedToGuestNtwk(ownerId, networkId, true);
|
||||
List<? extends IpAddress> addrs;
|
||||
Network guestNetwork = _networksDao.findById(networkId);
|
||||
if (guestNetwork.getGuestType() == GuestType.Shared) {
|
||||
// ignore the account id for the shared network
|
||||
addrs = _networkModel.listPublicIpsAssignedToGuestNtwk(networkId, true);
|
||||
} else {
|
||||
addrs = _networkModel.listPublicIpsAssignedToGuestNtwk(ownerId, networkId, true);
|
||||
}
|
||||
|
||||
IPAddressVO sourceNatIp = null;
|
||||
if (addrs.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue