ly pan has uploaded a new change for review.

Change subject: core: fix ArithmeticException when adding host with no swap 
space
......................................................................

core: fix ArithmeticException when adding host with no swap space

stat.getswap_total() will be divisor in checkVdsSwapThreshold(),
But when adding host which doesn't have swap space, it will return
zero

Change-Id: If4ad3d8b13cf2a784fcbb714434a676aba971102
Signed-off-by: plysan <ply...@gmail.com>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/40/12540/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
index f41a5b5..b466e3f 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
@@ -333,7 +333,7 @@
         Integer maxUsedPercentageThreshold =
                 
Config.GetValue(ConfigValues.LogMaxPhysicalMemoryUsedThresholdInPercentage);
 
-        if (stat.getswap_total() == null || stat.getswap_free() == null) {
+        if (stat.getswap_total() == null || stat.getswap_free() == null || 
stat.getswap_total() == 0) {
             return;
         }
 


--
To view, visit http://gerrit.ovirt.org/12540
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4ad3d8b13cf2a784fcbb714434a676aba971102
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ly pan <ply...@gmail.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to