cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: updated refs/heads/4.1 to c7f43d8
Date Mon, 29 Apr 2013 16:30:29 GMT
Updated Branches:
  refs/heads/4.1 06371babe -> c7f43d8d6


Look for null pointer on account id before trying to update usage when releasing
an IP. This seems to be possible if expunge fails at some point after freeing
an IP, on subsequent expunge tries the IP is freed already and gets null pointer
when looking for account id.

BUG-ID: CLOUDSTACK-2279
Bugfix-for: 4.1,4.2
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1367251304 -0600


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c7f43d8d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c7f43d8d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c7f43d8d

Branch: refs/heads/4.1
Commit: c7f43d8d69d46b8fbe3744b3ff7872ed959e713b
Parents: 06371ba
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Mon Apr 29 10:01:44 2013 -0600
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Mon Apr 29 17:24:15 2013 +0100

----------------------------------------------------------------------
 .../src/com/cloud/network/NetworkManagerImpl.java  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c7f43d8d/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index 77222c0..68de7a1 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -2793,7 +2793,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
             }
 
             // Save usage event
-            if (ip.getAllocatedToAccountId() != Account.ACCOUNT_ID_SYSTEM) {
+            if (ip.getAllocatedToAccountId() != null && ip.getAllocatedToAccountId()
!= Account.ACCOUNT_ID_SYSTEM) {
                 VlanVO vlan = _vlanDao.findById(ip.getVlanId());
 
                 String guestType = vlan.getVlanType().toString();


Mime
View raw message