Skip to content
Snippets Groups Projects
Commit b790839a authored by Iustin Pop's avatar Iustin Pop
Browse files

hail: add option for displaying the parsed request


This can be used for debugging.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 2c3273e7
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
-------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment