mirror of https://github.com/apache/cloudstack.git
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
This commit is contained in:
parent
06371babe8
commit
c7f43d8d69
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue