From 2b152bf17c5c12b722d01c9711c57e78261be784 Mon Sep 17 00:00:00 2001 From: zhangjianfeng Date: Mon, 8 May 2017 18:23:40 +0800 Subject: [PATCH] [bugfix]for division use accurate division for now / just get int value ,this will lead method filter_destination_hosts return 0 host because self.threshold / 100 * host.vcpus is 0 so we need use accurate division to change this close-bug: 1689269 Change-Id: I5663951ce750d6c4580a507ccfc0268baea0685f --- watcher/decision_engine/strategy/strategies/workload_balance.py | 1 + 1 file changed, 1 insertion(+) diff --git a/watcher/decision_engine/strategy/strategies/workload_balance.py b/watcher/decision_engine/strategy/strategies/workload_balance.py index 8107410ef..9f37d8fb2 100644 --- a/watcher/decision_engine/strategy/strategies/workload_balance.py +++ b/watcher/decision_engine/strategy/strategies/workload_balance.py @@ -46,6 +46,7 @@ hosts nodes. algorithm with `CONTINUOUS` audits. """ +from __future__ import division import datetime from oslo_config import cfg