Fix a couple of bugs in handling offline instances
authorIustin Pop <iustin@google.com>
Thu, 5 Jan 2012 11:01:45 +0000 (12:01 +0100)
committerIustin Pop <iustin@google.com>
Fri, 13 Jan 2012 13:23:30 +0000 (14:23 +0100)
commit55bd1414afe2771edf4c35286db3386b5d83fc3e
tree808e399a53de96e90bbf0f8e3dc8a58b92d69517
parent9cd6c32521f0f353561fd12e64aa81ddfb9c9260
Fix a couple of bugs in handling offline instances

The addition of the offline state for instances has introduced a few
bugs related to their handling. The current code adds a helper
function for making the check whether an instances uses reserved
memory on the secondary (and uses it instead of just autoBalance),
and furthermore uses consistently the state for primary node
operations.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>
htools/Ganeti/HTools/Instance.hs
htools/Ganeti/HTools/Node.hs