cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [21/50] [abbrv] git commit: updated refs/heads/ui-granular-settings to c1de600
Date Wed, 01 May 2013 21:45:51 GMT
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/a0dbf890
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a0dbf890
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a0dbf890

Branch: refs/heads/ui-granular-settings
Commit: a0dbf8909058dba202c057f5b9d589026399c6ef
Parents: 8545e68
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Mon Apr 29 10:01:44 2013 -0600
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Mon Apr 29 10:01:44 2013 -0600

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0dbf890/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 7adcf07..4a8b38f 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -2886,7 +2886,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