Commit 0d853843 authored by Iustin Pop's avatar Iustin Pop
Browse files

Ignore results from drained nodes in iallocator

Since drained nodes could be (partially or fully) broken in iallocator,
we ignore results from these nodes when building the cluster map in
preparation for sending it to the script.

This is a cheap change for the stable branch; ideally we should not
query them at all.

The patch also fixes a typo in iallocator.rst.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent d6d9ce45
......@@ -176,7 +176,7 @@ instances
dictionary with the data for the nodes in the cluster, indexed by
the node name; the dict contains:
the node name; the dict contains [*]_ :
the total disk size of this node (mebibytes)
......@@ -225,9 +225,13 @@ nodes
or ``offline`` flags set. More details about these of node status
flags is available in the manpage *ganeti(7)*.
.. [*] Note that no run-time data is present for offline or drained nodes;
this means the tags total_memory, reserved_memory, free_memory, total_disk,
free_disk, total_cpus, i_pri_memory and i_pri_up memory will be absent
Respone message
Response message
The response message is much more simple than the input one. It is
also a dict having three keys:
......@@ -6907,7 +6907,7 @@ class IAllocator(object):
"master_candidate": ninfo.master_candidate,
if not ninfo.offline:
if not (ninfo.offline or ninfo.drained):
if not isinstance(, dict):
raise errors.OpExecError("Can't get data for node %s" % nname)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment