mirror of https://github.com/apache/cloudstack.git
bug 13096 Make capacity deletion for pod deletion more robust.
Reviewed by : Kishan.
This commit is contained in:
parent
9f428e3817
commit
8a3a4ab9c0
|
|
@ -739,10 +739,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
if (!privateIps.isEmpty()) {
|
||||
if (!(_privateIpAddressDao.deleteIpAddressByPod(podId))) {
|
||||
throw new CloudRuntimeException("Failed to cleanup private ip addresses for pod " + podId);
|
||||
}
|
||||
|
||||
// Delete corresponding capacity record
|
||||
_capacityDao.removeBy(Capacity.CAPACITY_TYPE_PRIVATE_IP, null, podId, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete link local ip addresses for the pod
|
||||
|
|
@ -760,7 +757,10 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
_vlanDao.remove(vlan.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Delete corresponding capacity records
|
||||
_capacityDao.removeBy(null, null, podId, null, null);
|
||||
|
||||
// Delete the pod
|
||||
if (!(_podDao.remove(podId))) {
|
||||
throw new CloudRuntimeException("Failed to delete pod " + podId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue