On Fri, Sep 25, 2015 at 05:38:00PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
The search in tiered allocation is to first try shrinking the instance
to be allocated on the resource that blocks most allocations, and if
that fails try if unilaterally shrinking a single resource leads to a
valid solution. In that second step, we can drop the resource
investigated in the first step, as, after a shrinking step,
unilaterally shrinking it will be considered anyway.
Signed-off-by: Klaus Aehlig <[email protected]>
---
src/Ganeti/HTools/Cluster.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Ganeti/HTools/Cluster.hs b/src/Ganeti/HTools/Cluster.hs
index 0aa6c2f..2ea3580 100644
--- a/src/Ganeti/HTools/Cluster.hs
+++ b/src/Ganeti/HTools/Cluster.hs
@@ -917,7 +917,7 @@ tieredAlloc opts nl il limit newinst allocnodes ixes cstats
=
allocFn = fromMaybe emptyAllocSolution
. flip (tryAlloc opts nl' il') allocnodes
suffShrink = sufficesShrinking allocFn newinst
- bigSteps = filter isJust . map suffShrink $ sortedErrs
+ bigSteps = filter isJust . map suffShrink $ drop 1 sortedErrs
progress (Ok (_, _, _, newil', _)) (Ok (_, _, _, newil, _)) =
length newil' > length newil
progress _ _ = False
--
2.6.0.rc2.230.g3dd15c0
LGTM