On Mon, Mar 02, 2015 at 12:20:54PM +0100, 'Klaus Aehlig' via ganeti-devel wrote:
When dynamic data is not available, htools normally
proceed with a best guess based on the static information.
In a purely dynamic balancing set up this might, however,
be counterproductive. This option will tell htools to
exit in not all needed data is available.
Signed-off-by: Klaus Aehlig <[email protected]>
---
src/Ganeti/HTools/CLI.hs | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/Ganeti/HTools/CLI.hs b/src/Ganeti/HTools/CLI.hs
index 1f16dbd..289d17c 100644
--- a/src/Ganeti/HTools/CLI.hs
+++ b/src/Ganeti/HTools/CLI.hs
@@ -62,6 +62,7 @@ module Ganeti.HTools.CLI
, oMonDDataFile
, oMonDXen
, oEvacMode
+ , oMonDExitMissing
, oFirstJobGroup
, oRestrictedMigrate
, oExInst
@@ -152,6 +153,8 @@ data Options = Options
-- by MonDs
, optMonDXen :: Bool -- ^ Should Xen-specific collectors be
-- considered (only if MonD is queried)
+ , optMonDExitMissing :: Bool -- ^ If the program should exit on missing
+ -- MonD data
, optEvacMode :: Bool -- ^ Enable evacuation mode
, optRestrictedMigrate :: Bool -- ^ Disallow replace-primary moves
, optExInst :: [String] -- ^ Instances to be excluded
@@ -219,6 +222,7 @@ defaultOptions = Options
, optMonD = False
, optMonDFile = Nothing
, optMonDXen = False
+ , optMonDExitMissing = False
, optEvacMode = False
, optRestrictedMigrate = False
, optExInst = []
@@ -349,6 +353,13 @@ oMonDXen =
"also consider xen-specific collectors in MonD queries",
OptComplNone)
+oMonDExitMissing :: OptType
+oMonDExitMissing =
+ (Option "" ["exit-on-missing-mond-data"]
+ (NoArg (\ opts -> Ok opts { optMonDExitMissing = True }))
+ "abort if the data available from the monitoring daemons is incomplete",
+ OptComplNone)
+
oDiskTemplate :: OptType
oDiskTemplate =
(Option "" ["disk-template"]
--
2.2.0.rc0.207.ga3a616c
LGTM