Make hroller insist on finding precisely one master node
authorKlaus Aehlig <aehlig@google.com>
Thu, 18 Apr 2013 12:53:45 +0000 (14:53 +0200)
committerKlaus Aehlig <aehlig@google.com>
Fri, 19 Apr 2013 11:54:58 +0000 (13:54 +0200)
commit7dbe4c72582f1a9f8905fc4cf9dbfd05546ca920
treea6b4274e52eb3c5e4247061a170ea4825f339fe4
parent2c9fb8e264494a5bbccf65d01b98fc8eeb0ba278
Make hroller insist on finding precisely one master node

As people rely on the master node being the last node of the last
group, make hroller fail, if no master node could be found in the
cluster. This happens, e.g., if a backend format is used that does not
contain information about the master node. The error can be turned
into a warning by using the --force option.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
src/Ganeti/HTools/CLI.hs
src/Ganeti/HTools/Program/Hroller.hs
src/Ganeti/Utils.hs
test/hs/shelltests/htools-invalid.test
test/hs/shelltests/htools-single-group.test