Commit 63ac47cc authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos Committed by Iustin Pop
Browse files

LUNodeEvacuationStrategy: Use default iallocator


Signed-off-by: default avatarApollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 1c1b3cab
......@@ -8219,9 +8219,7 @@ class LUNodeEvacuationStrategy(NoHooksLU):
REQ_BGL = False
def CheckArguments(self):
if self.op.remote_node is not None and self.op.iallocator is not None:
raise errors.OpPrereqError("Give either the iallocator or the new"
" secondary, not both", errors.ECODE_INVAL)
_CheckIAllocatorOrNode(self, "iallocator", "remote_node")
def ExpandNames(self):
self.op.nodes = _GetWantedNodes(self, self.op.nodes)
......
......@@ -253,11 +253,6 @@ def EvacuateNode(opts, args):
dst_node = opts.dst_node
iallocator = opts.iallocator
cnt = [dst_node, iallocator].count(None)
if cnt != 1:
raise errors.OpPrereqError("One and only one of the -n and -I"
" options must be passed", errors.ECODE_INVAL)
op = opcodes.OpNodeEvacuationStrategy(nodes=args,
iallocator=iallocator,
remote_node=dst_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