This can be used for debugging.
---
htools/hail.hs | 8 ++++++++
man/hail.rst | 8 +++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/htools/hail.hs b/htools/hail.hs
index 646cdcf..a497b46 100644
--- a/htools/hail.hs
+++ b/htools/hail.hs
@@ -46,6 +46,7 @@ options =
[ oPrintNodes
, oDataFile
, oNodeSim
+ , oVerbose
, oShowVer
, oShowHelp
]
@@ -103,11 +104,18 @@ main = do
(opts, args) <- parseOpts cmd_args "hail" options
let shownodes = optShowNodes opts
+ verbose = optVerbose opts
request <- readRequest opts args
let Request rq cdata = request
+ when (verbose > 1) $
+ hPutStrLn stderr $ "Received request: " ++ show rq
+
+ when (verbose > 2) $
+ hPutStrLn stderr $ "Received cluster data: " ++ show cdata
+
when (isJust shownodes) $ do
hPutStrLn stderr "Initial cluster status:"
hPutStrLn stderr $ Cluster.printNodes (cdNodes cdata)
diff --git a/man/hail.rst b/man/hail.rst
index c4f7fb7..33b2787 100644
--- a/man/hail.rst
+++ b/man/hail.rst
@@ -9,7 +9,7 @@ hail - Ganeti IAllocator plugin
SYNOPSIS
--------
-**hail** [ **-t** *datafile* | **--simulate** *spec* ] *input-file*
+**hail** [ **-t** *file* | **--simulate** *spec* ] [options...] *input-file*
**hail** --version
@@ -68,6 +68,12 @@ The options that can be passed to the program are as follows:
data with a simulated cluster. For details about the description,
see the man page **hspace**(1).
+-v
+ This option increases verbosity and can be used for debugging in order
+ to understand how the IAllocator request is parsed; it can be passed
+ multiple times for successively more information.
+
+
CONFIGURATION
-------------
--
1.7.3.1