From c50452c3186ac1f3182a6755f3156f3aae848523 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Wed, 23 Nov 2011 14:01:23 +0100 Subject: [PATCH] LUNodeEvacuate: Disallow migrating all instances at once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is a design issue in the iallocator interface which prevents us from doing this. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: RenΓ© Nussbaumer <rn@google.com> --- lib/cmdlib.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 421f07169..2e641d845 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -10148,6 +10148,14 @@ class LUNodeEvacuate(NoHooksLU): else: # All instances assert self.op.mode == constants.IALLOCATOR_NEVAC_ALL + # TODO: In 2.6, change the iallocator interface to take an evacuation mode + # per instance + raise errors.OpPrereqError("Due to an issue with the iallocator" + " interface it is not possible to evacuate" + " all instances at once; specify explicitly" + " whether to evacuate primary or secondary" + " instances", + errors.ECODE_INVAL) inst_fn = _GetNodeInstances return inst_fn(self.cfg, self.op.node_name) -- GitLab