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

Update node group iallocator design to use job dependencies

While working on a function to submit jobsets, I realized that we
actually don't need them anymore. With the new job dependencies, the
iallocator plugin can just generate the right dependencies and gets the
same effect as with jobsets. This saves us from having to implement
jobsets in Ganeti core.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 45df0793
......@@ -68,7 +68,10 @@ of **replace secondary**, **migration** and **failover** operations
operations within the corresponding mobility domain).
The result of the operations described above must contain two lists of
instances and a list of jobsets.
instances and a list of jobs (each of which is a list of serialized
opcodes) to actually execute the operation. :doc:`Job dependencies
<design-chained-jobs>` can be used to force jobs to run in a certain
order while still making use of parallelism.
The two lists of instances describe which instances could be
moved/migrated and which couldn't for some reason ("unsuccessful"). The
......@@ -93,11 +96,16 @@ The unsuccessful list of instances contains elements as follows::
where ``explanation`` is a string describing why the plugin was not able
to relocate the instance.
The list of jobsets contained in the result describe how to actually
execute the operation. Each jobset contains lists of serialized opcodes.
The client is given a list of job IDs (see the :doc:`design for
LU-generated jobs <design-lu-generated-jobs>`) which it can watch.
Failures should be reported to the user.
.. highlight:: python
Example job list::
# First job
"instance_name": "",
......@@ -106,18 +114,26 @@ Example::
"instance_name": "",
# Second job
"depends": [
[-1, ["success"]],
"instance_name": "",
"mode": "replace_new_secondary",
"remote_node": ""
"remote_node": "",
# Third job
"depends": [
[-2, []],
"instance_name": "",
Accepted opcodes:
......@@ -126,12 +142,6 @@ Accepted opcodes:
Starting with the first set, Ganeti will submit all jobs of a set at the
same time, enabling execution in parallel. Upon completion of all jobs
in a set, the process is repeated for the next one. Ganeti is at liberty
to abort the execution after any jobset. In such a case the user is
notified and can restart the operation.
.. vim: set textwidth=72 :
.. Local Variables:
.. mode: rst
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