Revision e3303a4e

b/lib/cmdlib.py
6013 6013
    shutdown_timeout = self.op.shutdown_timeout
6014 6014
    self._migrater = TLMigrateInstance(self, self.op.instance_name,
6015 6015
                                       cleanup=False,
6016
                                       iallocator=self.op.iallocator,
6017
                                       target_node=self.op.target_node,
6018 6016
                                       failover=True,
6019 6017
                                       ignore_consistency=ignore_consistency,
6020 6018
                                       shutdown_timeout=shutdown_timeout)
......
6041 6039
    """
6042 6040
    instance = self._migrater.instance
6043 6041
    source_node = instance.primary_node
6044
    target_node = self._migrater.target_node
6042
    target_node = self.op.target_node
6045 6043
    env = {
6046 6044
      "IGNORE_CONSISTENCY": self.op.ignore_consistency,
6047 6045
      "SHUTDOWN_TIMEOUT": self.op.shutdown_timeout,
......
6115 6113
    """
6116 6114
    instance = self._migrater.instance
6117 6115
    source_node = instance.primary_node
6118
    target_node = self._migrater.target_node
6116
    target_node = self.op.target_node
6119 6117
    env = _BuildInstanceHookEnvByObject(self, instance)
6120 6118
    env.update({
6121 6119
      "MIGRATE_LIVE": self._migrater.live,
......
6475 6473
      target_node = self.target_node
6476 6474

  
6477 6475
      if len(self.lu.tasklets) == 1:
6478
        # It is safe to release locks only when we're the only tasklet in the LU
6476
        # It is safe to release locks only when we're the only tasklet
6477
        # in the LU
6479 6478
        _ReleaseLocks(self, locking.LEVEL_NODE,
6480 6479
                      keep=[instance.primary_node, self.target_node])
6481 6480

  
......
6486 6485
                                        " %s disk template" %
6487 6486
                                        instance.disk_template)
6488 6487
      target_node = secondary_nodes[0]
6489
      if self.lu.op.iallocator or (self.target_node and
6490
                                   self.target_node != target_node):
6488
      if self.lu.op.iallocator or (self.lu.op.target_node and
6489
                                   self.lu.op.target_node != target_node):
6491 6490
        if self.failover:
6492 6491
          text = "failed over"
6493 6492
        else:

Also available in: Unified diff