On Wed, Apr 15, 2015 at 04:24:54PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
Capacity problems, like global N+1 redundancy in the presence
of shared storage, are not likely to disappear by rebalancing
the cluster. Hence they are not necessarily useful for tools
like hcheck. So add an option to ignore those checks.
Signed-off-by: Klaus Aehlig <[email protected]>
---
src/Ganeti/HTools/CLI.hs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/Ganeti/HTools/CLI.hs b/src/Ganeti/HTools/CLI.hs
index 0c94c02..becd38d 100644
--- a/src/Ganeti/HTools/CLI.hs
+++ b/src/Ganeti/HTools/CLI.hs
@@ -115,6 +115,7 @@ module Ganeti.HTools.CLI
, oTieredSpec
, oVerbose
, oPriority
+ , oNoCapacityChecks
, genericOpts
) where
@@ -204,6 +205,7 @@ data Options = Options
, optReplay :: Maybe String -- ^ Unittests: RNG state
, optVerbose :: Int -- ^ Verbosity level
, optPriority :: Maybe OpSubmitPriority -- ^ OpCode submit priority
+ , optCapacity :: Bool -- ^ Also do capacity-related checks
} deriving Show
-- | Default values for the command line options.
@@ -271,6 +273,7 @@ defaultOptions = Options
, optReplay = Nothing
, optVerbose = 1
, optPriority = Nothing
+ , optCapacity = True
}
-- | Abbreviation for the option type.
@@ -783,6 +786,13 @@ oPriority =
"set the priority of submitted jobs",
OptComplChoices (map fmtSubmitPriority [minBound..maxBound]))
+oNoCapacityChecks :: OptType
+oNoCapacityChecks =
+ (Option "" ["no-capacity-checks"]
+ (NoArg (\ opts -> Ok opts { optCapacity = False}))
+ "disable capacity checks (like global N+1 redundancy)",
+ OptComplNone)
+
-- | Generic options.
genericOpts :: [GenericOptType Options]
genericOpts = [ oShowVer
--
2.2.0.rc0.207.ga3a616c
LGTM