Commit 6b826dfa authored by Guido Trotter's avatar Guido Trotter
Browse files

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: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 9f18e2cc
......@@ -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)
......
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