[Pkg-ganeti-devel] [ganeti] 109/165: Add a new option for disabling capacity checks
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Tue Aug 11 13:53:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch master
in repository ganeti.
commit 8de23747f67e78f0c4502da5af9b76e96a03b695
Author: Klaus Aehlig <aehlig at google.com>
Date: Wed Apr 15 12:54:41 2015 +0200
Add a new option for disabling capacity checks
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 <aehlig at google.com>
Reviewed-by: Petr Pudlak <pudlak at google.com>
---
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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git
More information about the Pkg-ganeti-devel
mailing list