On Mon, Jun 06, 2011 at 05:11:15PM +0200, Michael Hanselmann wrote:
> A while ago a new ``multi-relocate`` mode was proposed and documented.
> As it turned out, the interface had some deficiencies. With this patch
> The relocation modes are reduced to two and split into separate
> iallocator request modes: node-evacuate and change-group. Some request
> and response requirements are clarified in the documentation.
Replying on old thread for a small change, see below.
> diff --git a/doc/design-multi-reloc.rst b/doc/design-multi-reloc.rst
> index f4b581c..7f0d254 100644
> --- a/doc/design-multi-reloc.rst
> +++ b/doc/design-multi-reloc.rst
[…]
> +The result of the operations described above must contain two lists of
> +instances and a list of jobsets.
> +
> +The two lists of instances describe which instances could be
> +moved/migrated and which couldn't for some reason ("unsuccessful"). The
> +union of the two lists must be equal to the set of instances given in
> +the original request.
As I read this, the result will be something like (with tuples for
readability, even though in JSON they are also lists):
([failed-instance-names], [moved-instances-names], [[opcode]])
Note: the iallocator code as submitted and sent for review seems to
ignore the instance lists, but that's beside the point.
The problem with the above definition is twofold.
First, [[opcode]] is a list of jobs, not of jobsets. Proper jobsets
would be [[job]] i.e. [[[opcode]]]. Do we care about jobsets or can we
just talk about jobs? In this context, each job would represent a
complete instance move, whereas a jobset would represent jobs that can
(probably) be executed in parallel, since they touch different nodes.
But IAllocator plugins don't have all information about the locking
model, so maybe jobsets are not as useful (though in hbal they were).
Second, from my experience [failed-instance-names] is a bad data
structure for the user, since there's no way to extract more information
from the iallocator plugin about failures. I propose that we change this
to the following: [(instance-name, details)], where 'details' is a
string holding any information the IAllocator might (already) have for
the failure reason.
Thoughts?
thanks,
iustin