You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/10/14 10:36:12 UTC
[cloudstack] branch master updated: vmware: use
hotPlugMemoryIncrementSize only for valid value (#4348)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new 5b419b9 vmware: use hotPlugMemoryIncrementSize only for valid value (#4348)
5b419b9 is described below
commit 5b419b90d032924ed71553bc3c69832c96b104ee
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Wed Oct 14 16:05:57 2020 +0530
vmware: use hotPlugMemoryIncrementSize only for valid value (#4348)
Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
.../main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 93eb1bb..711020a 100644
--- a/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -1634,7 +1634,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
}
// Check increment is multiple of increment size
- long reminder = requestedMaxMemoryInMb % hotaddIncrementSizeInMb;
+ long reminder = hotaddIncrementSizeInMb > 0 ? requestedMaxMemoryInMb % hotaddIncrementSizeInMb : 0;
if (reminder != 0) {
requestedMaxMemoryInMb = requestedMaxMemoryInMb + hotaddIncrementSizeInMb - reminder;
}