Commit df0d116f authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Merge branch 'devel-2.4'

* devel-2.4:
  node evac: don't call IAllocator if no instances
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parents bd614fa4 cb156a3e
...@@ -9738,10 +9738,13 @@ class LUNodeEvacStrategy(NoHooksLU): ...@@ -9738,10 +9738,13 @@ class LUNodeEvacStrategy(NoHooksLU):
locks[locking.LEVEL_NODE] = self.op.nodes + [self.op.remote_node] locks[locking.LEVEL_NODE] = self.op.nodes + [self.op.remote_node]
def Exec(self, feedback_fn): def Exec(self, feedback_fn):
if self.op.remote_node is not None:
instances = [] instances = []
for node in self.op.nodes: for node in self.op.nodes:
instances.extend(_GetNodeSecondaryInstances(self.cfg, node)) instances.extend(_GetNodeSecondaryInstances(self.cfg, node))
if not instances:
return []
if self.op.remote_node is not None:
result = [] result = []
for i in instances: for i in instances:
if i.primary_node == self.op.remote_node: if i.primary_node == self.op.remote_node:
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