Commit 6e94c4eb authored by Klaus Aehlig's avatar Klaus Aehlig

Make htools tolerate missing "spfree" on luxi

If a cluster allows sharedfile as only disk template, the
amount of free spindles might not be available. This is
perfectly normal, hence the luxi backend of htools should
handle this case gracefully and just report 0 available spindles.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent 1003d92c
......@@ -220,7 +220,10 @@ parseNode ktg [ name, mtotal, mnode, mfree, dtotal, dfree
xsptotal <- if xexcl_stor
then lvconvert 0 "sptotal" sptotal
else convert "spindles" spindles
xspfree <- lvconvert 0 "spfree" spfree
xspfree <- genericResult (const $ return (0 :: Int)) return
$ lvconvert 0 "spfree" spfree
-- "spfree" might be missing, if sharedfile is the only
-- supported disk template
xmtotal <- lvconvert 0.0 "mtotal" mtotal
xmnode <- lvconvert 0 "mnode" mnode
xmfree <- lvconvert 0 "mfree" mfree
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment