iallocator: Add node whitelist
authorMichael Hanselmann <hansmi@google.com>
Fri, 23 Nov 2012 01:56:04 +0000 (02:56 +0100)
committerMichael Hanselmann <hansmi@google.com>
Tue, 4 Dec 2012 17:54:37 +0000 (18:54 +0100)
commitfb60bc6a1bbf06a350a680f430f9ec833f1e3628
tree623e21351de65b5fbe40c77e68a4a88123747e0d
parentd5b031dc9e2e1a88296ecc408bcf4964497e0c18
iallocator: Add node whitelist

In the future instance creations might have a lock on all nodes as was
the case until the implementation of opportunistic locking. Nodes for
which the lock is not held will be shown to the iallocator plugin as if
they were marked offline.

This patch adds a new parameter named “node_whitelist” to
“IAReqInstanceAlloc”. If set to a list, only nodes contained within are
shown as online.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
lib/masterd/iallocator.py
test/ganeti.masterd.iallocator_unittest.py