mirror of https://github.com/apache/cloudstack.git
bug 9667: when delete port forwarding rule as a part of vm expunge, keep in mind that guest ip addresses can be the same for the same account in different zones
status 9667: resolved fixed
This commit is contained in:
parent
ae570460c1
commit
1eb2b8514c
|
|
@ -1166,6 +1166,7 @@ public class UserVmManagerImpl implements UserVmManager {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void releaseGuestIpAddress(UserVmVO userVm) {
|
||||
ServiceOffering offering = _offeringDao.findById(userVm.getServiceOfferingId());
|
||||
|
||||
|
|
@ -1974,7 +1975,7 @@ public class UserVmManagerImpl implements UserVmManager {
|
|||
|
||||
if(publicIp!=null)
|
||||
{
|
||||
if((publicIp.getAccountId().longValue() == vm.getAccountId()))
|
||||
if((publicIp.getAccountId().longValue() == vm.getAccountId()) && (publicIp.getDataCenterId() == vm.getDataCenterId()))
|
||||
{
|
||||
_networkMgr.deleteRule(rule.getId(), Long.valueOf(User.UID_SYSTEM), Long.valueOf(User.UID_SYSTEM));
|
||||
if(s_logger.isDebugEnabled())
|
||||
|
|
@ -2218,6 +2219,7 @@ public class UserVmManagerImpl implements UserVmManager {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public VMTemplateVO createPrivateTemplateRecord(Long userId, long volumeId, String name, String description, long guestOSId, Boolean requiresHvm, Integer bits, Boolean passwordEnabled, boolean isPublic, boolean featured)
|
||||
throws InvalidParameterValueException {
|
||||
|
||||
|
|
@ -2940,7 +2942,8 @@ public class UserVmManagerImpl implements UserVmManager {
|
|||
_vmMgr = vmMgr;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
@Override
|
||||
public void run() {
|
||||
GlobalLock scanLock = GlobalLock.getInternLock("UserVMExpunge");
|
||||
try {
|
||||
if(scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue