On Tue, Sep 01, 2015 at 08:36:12PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
When checking global capacity, there is an algorithmic
difference on whether evacuation should also be tested
for initial violations (e.g., instances originally on
an offline node) or not. So provide an algorithmic
parameter for this, propagating the value of
the --accept-existing option.

Signed-off-by: Klaus Aehlig <[email protected]>
---
src/Ganeti/HTools/AlgorithmParams.hs | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/Ganeti/HTools/AlgorithmParams.hs 
b/src/Ganeti/HTools/AlgorithmParams.hs
index 8531458..c49eed1 100644
--- a/src/Ganeti/HTools/AlgorithmParams.hs
+++ b/src/Ganeti/HTools/AlgorithmParams.hs
@@ -54,6 +54,8 @@ data AlgorithmOptions = AlgorithmOptions
  , algCapacity :: Bool             -- ^ Whether to check capacity properties,
                                    -- like global N+1 redundancy
  , algRestrictToNodes :: Maybe [String] -- ^ nodes to restrict allocation to
+  , algAcceptExisting :: Bool       -- ^ accept existing violations in capacity
+                                    -- checks
  }

-- | Obtain the relevant algorithmic option from the commandline options
@@ -68,6 +70,7 @@ fromCLIOptions opts = AlgorithmOptions
  , algMinGainLimit = CLI.optMinGainLim opts
  , algCapacity = CLI.optCapacity opts
  , algRestrictToNodes = CLI.optRestrictToNodes opts
+  , algAcceptExisting = CLI.optAcceptExisting opts
  }

-- | Default options for the balancing algorithm
--
2.5.0.457.gab17608


LGTM

Reply via email to