Roy Golan has uploaded a new change for review. Change subject: core: report 0 on negative values in maxSchedulingMemory ......................................................................
core: report 0 on negative values in maxSchedulingMemory Max memory for scheduling VMs should show 0 when the value is negative Change-Id: I1762002d89d1b015fa805084d7de7945c393f345 Bug-Url: https://bugzilla.redhat.com/866186 Signed-off-by: Roy Golan <[email protected]> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/8701/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java index e447877..39e66b9 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java @@ -1179,6 +1179,8 @@ maxSchedulingMemory = (getmax_vds_memory_over_commit() * getphysical_mem_mb() / 100.0f) - (getmem_commited() + getreserved_mem()); } + // avoid negative values + maxSchedulingMemory = maxSchedulingMemory > 0 ? maxSchedulingMemory : 0; } public float getMaxSchedulingMemory() { -- To view, visit http://gerrit.ovirt.org/8701 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1762002d89d1b015fa805084d7de7945c393f345 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
