mirror of https://github.com/apache/cloudstack.git
bug 7933: this happens if you create a vm off of a so, and then delete that so. the so now ceases to exist, however, the host tries to calc stats using the so, which is null. fixing that issue.
status 7933: resolved fixed
This commit is contained in:
parent
d7d9a251be
commit
13c0478b9b
|
|
@ -2876,7 +2876,7 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
Long parentId = cmd.getParentDomainId();
|
||||
Long ownerId = UserContext.current().getCaller().getId();
|
||||
Account account = UserContext.current().getCaller();
|
||||
|
||||
|
||||
if (ownerId == null) {
|
||||
ownerId = Long.valueOf(1);
|
||||
}
|
||||
|
|
@ -3153,7 +3153,9 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
List<UserVmVO> instances = _userVmDao.listUpByHostId(hostId);
|
||||
for (UserVmVO vm : instances) {
|
||||
ServiceOffering so = findServiceOfferingById(vm.getServiceOfferingId());
|
||||
mem += so.getRamSize() * 1024L * 1024L;
|
||||
if (so != null) {
|
||||
mem += so.getRamSize() * 1024L * 1024L;
|
||||
}
|
||||
}
|
||||
return mem;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue