Skip to content
Snippets Groups Projects
Commit 1d42996b authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix TLMigrateInstance use of IAllocator


hail now expects correctly that relocate_from is of equal length with
the number of required nodes (fixme: there's a lot of not well
documented behaviour here… not nice for any other potential
IAllocators). As such, we _need_ to pass just the instance's primary
node.

Additionally, update the iallocator doc to correctly specify what this
list (`relocate_from`) contains.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 64946775
No related branches found
No related tags found
No related merge requests found
......@@ -285,9 +285,11 @@ Allocation needs, in addition:
Relocation:
relocate_from
a list of nodes to move the instance away from (note that with
Ganeti 2.0, this list will always contain a single node, the
current secondary of the instance); type *list of strings*
a list of nodes to move the instance away from; for DRBD-based
instances, this will contain a single node, the current secondary
of the instance, whereas for shared-storage instance, this will
contain also a single node, the current primary of the instance;
type *list of strings*
As for ``node-evacuate``, it needs the following request arguments:
......
......@@ -8013,9 +8013,7 @@ class TLMigrateInstance(Tasklet):
ial = IAllocator(self.cfg, self.rpc,
mode=constants.IALLOCATOR_MODE_RELOC,
name=self.instance_name,
# TODO See why hail breaks with a single node below
relocate_from=[self.instance.primary_node,
self.instance.primary_node],
relocate_from=[self.instance.primary_node],
)
 
ial.Run(self.lu.op.iallocator)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment