From f4908758b33623f892416647fd986a7512324c0e Mon Sep 17 00:00:00 2001 From: alena Date: Tue, 23 Nov 2010 15:04:13 -0800 Subject: [PATCH] bug 7234: don't try to delete pod level vlan when it doesn't exist status 7234: resolved fixed --- server/src/com/cloud/user/AccountManagerImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java index b3f543d236e..290c8280104 100755 --- a/server/src/com/cloud/user/AccountManagerImpl.java +++ b/server/src/com/cloud/user/AccountManagerImpl.java @@ -867,10 +867,13 @@ public class AccountManagerImpl implements AccountManager, AccountService { for (IPAddressVO ip : ips) { List 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;