bug 7234: don't try to delete pod level vlan when it doesn't exist

status 7234: resolved fixed
This commit is contained in:
alena 2010-11-23 15:04:13 -08:00
parent cb74030d01
commit f4908758b3
1 changed files with 6 additions and 3 deletions

View File

@ -867,10 +867,13 @@ public class AccountManagerImpl implements AccountManager, AccountService {
for (IPAddressVO ip : ips) {
List<PodVlanMapVO> podVlanMaps = _podVlanMapDao.listPodVlanMapsByVlan(ip.getVlanDbId());
Long podId = podVlanMaps.get(0).getPodId();
if (podId != null) {
continue;//bug 5561 do not release direct attach pod ips until vm is destroyed
if (podVlanMaps != null && podVlanMaps.size() != 0) {
Long podId = podVlanMaps.get(0).getPodId();
if (podId != null) {
continue;//bug 5561 do not release direct attach pod ips until vm is destroyed
}
}
if (!_networkMgr.releasePublicIpAddress(User.UID_SYSTEM, ip.getAddress())) {
s_logger.error("Unable to release IP: " + ip.getAddress());
accountCleanupNeeded = true;