Handle nodes without local storage
authorIustin Pop <iustin@google.com>
Sun, 19 Feb 2012 20:59:48 +0000 (21:59 +0100)
committerIustin Pop <iustin@google.com>
Wed, 7 Mar 2012 21:04:47 +0000 (23:04 +0200)
commitb774325883b8eb12df17376fd8737c859ca105e5
tree6d04a2406a89d3b2a8ddb45bce650249c5f5f8e4
parent035b33e20bc54c0c26942a0864c0384190881484
Handle nodes without local storage

Our current cluster model is based on per-node storage, and as such we
don't handle shared disk templates. Until we can improve the model,
let's handle nodes without local storage better: in order to still
compute a valid cluster score, we need to handle nodes with tDsk == 0.

For this, we abstract the in-line computation of pDsk (which is used
in the cluster score) to a separate function which, for tDsk == 0,
returns instead 1 (i.e. disk fully used).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
htools/Ganeti/HTools/Node.hs