On Thu, Jul 23, 2015 at 07:34:04PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
As per the design of the maintenance daemon, the balancing
phase should only submit jobs not touching at all nodes where
other maintenance operations are going on.

(Note that this differnt from the RestricToNodes options which
are strictly for allocation only. Also, nodes are identified
by their index in the map, and not by name.)

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

diff --git a/src/Ganeti/HTools/AlgorithmParams.hs 
b/src/Ganeti/HTools/AlgorithmParams.hs
index 274ca7b..3d33f7d 100644
--- a/src/Ganeti/HTools/AlgorithmParams.hs
+++ b/src/Ganeti/HTools/AlgorithmParams.hs
@@ -41,6 +41,8 @@ module Ganeti.HTools.AlgorithmParams
  , fromCLIOptions
  ) where

+import qualified Data.Set as Set
+
import qualified Ganeti.HTools.CLI as CLI

data AlgorithmOptions = AlgorithmOptions
@@ -58,6 +60,8 @@ data AlgorithmOptions = AlgorithmOptions
  , algCapacity :: Bool             -- ^ Whether to check capacity properties,
                                    -- like global N+1 redundancy
  , algRestrictToNodes :: Maybe [String] -- ^ nodes to restrict allocation to
+  , algAllowedNodes :: Maybe (Set.Set Int) -- ^ if given, do not perform any
+                                    -- operations involving other nodes
  }

-- | Obtain the relevant algorithmic option from the commandline options
@@ -73,6 +77,7 @@ fromCLIOptions opts = AlgorithmOptions
  , algMinGainLimit = CLI.optMinGainLim opts
  , algCapacity = CLI.optCapacity opts
  , algRestrictToNodes = CLI.optRestrictToNodes opts
+  , algAllowedNodes = Nothing
  }

-- | Default options for the balancing algorithm
--
2.4.3.573.g4eafbef


LGTM

Reply via email to