weizhouapache commented on a change in pull request #3839: FEATURE-3823: kvm 
agent hooks
URL: https://github.com/apache/cloudstack/pull/3839#discussion_r371312961
 
 

 ##########
 File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
 ##########
 @@ -1015,11 +1015,12 @@ public UserVm upgradeVirtualMachine(UpgradeVMCmd cmd) 
throws ResourceAllocationE
         int currentCpu = currentServiceOffering.getCpu();
         int currentMemory = currentServiceOffering.getRamSize();
 
+        Account owner = 
_accountMgr.getActiveAccountById(vmInstance.getAccountId());
         if (newCpu > currentCpu) {
-            _resourceLimitMgr.checkResourceLimit(caller, ResourceType.cpu, 
newCpu - currentCpu);
+            _resourceLimitMgr.checkResourceLimit(owner, ResourceType.cpu, 
newCpu - currentCpu);
         }
         if (newMemory > currentMemory) {
-            _resourceLimitMgr.checkResourceLimit(caller, ResourceType.memory, 
newMemory - currentMemory);
+            _resourceLimitMgr.checkResourceLimit(owner, ResourceType.memory, 
newMemory - currentMemory);
         }
 
         // Check that the specified service offering ID is valid
 
 Review comment:
   @DennisKonrad I do not think so.
   @bwsw could you use "git rebase" with latest master, instead of "git merge" ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to