From 6b826dfa14eca35769958a52a5037db2e93aad0a Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Fri, 20 Jan 2012 14:30:56 +0000 Subject: [PATCH] Migrate: don't check for free memory on cleanup Cleanup just updates the config with the correct location of the instance, or informs of its down status, but never starts it. As such there's no point in checking for enough free memory. Actually this check could prevent a perfectly safe cleanup operation if a node is busy. Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/cmdlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 972f141dd..a052039c1 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -7131,7 +7131,7 @@ class TLMigrateInstance(Tasklet): i_be = self.cfg.GetClusterInfo().FillBE(instance) # check memory requirements on the secondary node - if not self.failover or instance.admin_up: + if not self.cleanup and (not self.failover or instance.admin_up): _CheckNodeFreeMemory(self.lu, target_node, "migrating instance %s" % instance.name, i_be[constants.BE_MEMORY], instance.hypervisor) -- GitLab