diff --git a/doc/iallocator.rst b/doc/iallocator.rst index 9dfc847c178f336adaafef81ec771919498b3af6..408b908cfc67f6af90c1e4c5aec268771c58b7c6 100644 --- a/doc/iallocator.rst +++ b/doc/iallocator.rst @@ -176,7 +176,7 @@ instances nodes dictionary with the data for the nodes in the cluster, indexed by - the node name; the dict contains: + the node name; the dict contains [*]_ : total_disk 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: diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 19196637be928ca6e0e88f118fcc755e362f9e61..78a379ddf23e1515e5bd611877e15ac0f8991428 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -6907,7 +6907,7 @@ class IAllocator(object): "master_candidate": ninfo.master_candidate, } - if not ninfo.offline: + if not (ninfo.offline or ninfo.drained): nresult.Raise() if not isinstance(nresult.data, dict): raise errors.OpExecError("Can't get data for node %s" % nname)