LGTM, thanks

On Wed, 27 May 2015 at 18:26 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> Our calling convention for the iallocator is, that if a non-None
> value for the node_whitelist is passed, only nodes from this list
> should be allocated. While it is not useful to pass the empty list
> here, the allocator should still dutifully fail instead of choosing
> from the whole set of nodes.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  lib/masterd/iallocator.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/masterd/iallocator.py b/lib/masterd/iallocator.py
> index 8e29d6b..3c1c152 100644
> --- a/lib/masterd/iallocator.py
> +++ b/lib/masterd/iallocator.py
> @@ -815,7 +815,7 @@ class IAllocator(object):
>        node_whitelist = self.req.node_whitelist
>      else:
>        node_whitelist = None
> -    if node_whitelist:
> +    if node_whitelist is not None:
>        request["restrict-to-nodes"] = node_whitelist
>
>      self.in_data["request"] = request
> --
> 2.2.0.rc0.207.ga3a616c
>
>

Reply via email to