From 1b67be9bf42c48721532335853f9d571ff507a0c Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Thu, 10 Jun 2010 17:43:59 +0100 Subject: [PATCH] TLMigrateInstance: pass lu to _Check* The various _Check* helper functions expect an lu to be passed in, but the TL is passed instead. This works... sometimes! :) Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/cmdlib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index b89a25aa3..05d5f4cb5 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -5461,15 +5461,15 @@ class TLMigrateInstance(Tasklet): target_node = secondary_nodes[0] # check memory requirements on the secondary node - _CheckNodeFreeMemory(self, target_node, "migrating instance %s" % + _CheckNodeFreeMemory(self.lu, target_node, "migrating instance %s" % instance.name, i_be[constants.BE_MEMORY], instance.hypervisor) # check bridge existance - _CheckInstanceBridgesExist(self, instance, node=target_node) + _CheckInstanceBridgesExist(self.lu, instance, node=target_node) if not self.cleanup: - _CheckNodeNotDrained(self, target_node) + _CheckNodeNotDrained(self.lu, target_node) result = self.rpc.call_instance_migratable(instance.primary_node, instance) result.Raise("Can't migrate, please use failover", @@ -5658,7 +5658,7 @@ class TLMigrateInstance(Tasklet): self.feedback_fn("* checking disk consistency between source and target") for dev in instance.disks: - if not _CheckDiskConsistency(self, dev, target_node, False): + if not _CheckDiskConsistency(self.lu, dev, target_node, False): raise errors.OpExecError("Disk %s is degraded or not fully" " synchronized on target node," " aborting migrate." % dev.iv_name) -- GitLab