Revision 9711e69d lib/cmdlib.py

b/lib/cmdlib.py
6235 6235
        self.target_node = self.lu.op.target_node
6236 6236

  
6237 6237
      target_node = self.target_node
6238
      if self.target_node == instance.primary_node:
6239
        raise errors.OpPrereqError("Cannot migrate instance %s"
6240
                                   " to its primary (%s)" %
6241
                                   (instance.name, instance.primary_node))
6238 6242

  
6239 6243
      if len(self.lu.tasklets) == 1:
6240 6244
        # It is safe to remove locks only when we're the only tasklet in the LU

Also available in: Unified diff