mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-21 13:03:10 +01:00
Merge pull request #1947 from ustcweizhou/RemoveSecondaryIP
CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used * pr/1947: CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
This commit is contained in:
commit
c6f0ba76b1
@ -835,7 +835,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
|
||||
}
|
||||
}
|
||||
//check if the secondary ip associated with any static nat rule
|
||||
IPAddressVO publicIpVO = _ipAddressDao.findByVmIp(secondaryIp);
|
||||
IPAddressVO publicIpVO = _ipAddressDao.findByIpAndNetworkId(secIpVO.getNetworkId(), secondaryIp);
|
||||
if (publicIpVO != null) {
|
||||
s_logger.debug("VM nic IP " + secondaryIp + " is associated with the static NAT rule public IP address id " + publicIpVO.getId());
|
||||
throw new InvalidParameterValueException("Can' remove the ip " + secondaryIp + "is associate with static NAT rule public IP address id " + publicIpVO.getId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user