Revision dcfb969a
b/lib/cmdlib.py | ||
---|---|---|
6565 | 6565 |
# self.target_node is already populated, either directly or by the |
6566 | 6566 |
# iallocator run |
6567 | 6567 |
target_node = self.target_node |
6568 |
if self.target_node == instance.primary_node: |
|
6569 |
raise errors.OpPrereqError("Cannot migrate instance %s" |
|
6570 |
" to its primary (%s)" % |
|
6571 |
(instance.name, instance.primary_node)) |
|
6568 | 6572 |
|
6569 | 6573 |
if len(self.lu.tasklets) == 1: |
6570 | 6574 |
# It is safe to release locks only when we're the only tasklet |
Also available in: Unified diff