Document OpNodeMigrate's result for RAPI
[ganeti-local] / doc / iallocator.rst
index 6ecd626..26cc808 100644 (file)
@@ -1,7 +1,7 @@
 Ganeti automatic instance allocation
 ====================================
 
-Documents Ganeti version 2.1
+Documents Ganeti version 2.5
 
 .. contents::
 
@@ -190,14 +190,21 @@ In all cases, it includes:
 
   type
     the request type; this can be either ``allocate``, ``relocate``,
-    ``multi-relocate`` or ``multi-evacuate``. The ``allocate`` request
-    is used when a new instance needs to be placed on the cluster. The
-    ``relocate`` request is used when an existing instance needs to be
-    moved within its node group, while the ``multi-relocate`` one is
-    able to relocate multiple instances across multiple node groups. The
-    ``multi-evacuate`` protocol requests that the script computes the
-    optimal relocate solution for all secondary instances of the given
-    nodes.
+    ``change-group`` or ``node-evacuate``. The
+    ``allocate`` request is used when a new instance needs to be placed
+    on the cluster. The ``relocate`` request is used when an existing
+    instance needs to be moved within its node group.
+
+    The ``multi-evacuate`` protocol used to request that the script
+    computes the optimal relocate solution for all secondary instances
+    of the given nodes. It is now deprecated and needs only be
+    implemented if backwards compatibility with Ganeti 2.4 and lower is
+    needed.
+
+    The ``change-group`` request is used to relocate multiple instances
+    across multiple node groups. ``node-evacuate`` evacuates instances
+    off their node(s). These are described in a separate :ref:`design
+    document <multi-reloc-detailed-design>`.
 
 For both allocate and relocate mode, the following extra keys are needed
 in the ``request`` dictionary:
@@ -276,29 +283,25 @@ Relocation:
      Ganeti 2.0, this list will always contain a single node, the
      current secondary of the instance); type *list of strings*
 
-As for ``multi-relocate``, it needs the three following request
-arguments:
+As for ``node-evacuate``, it needs the following request arguments:
 
   instances
-    a list of instance names to relocate; type *list of strings*
+    a list of instance names to evacuate; type *list of strings*
 
-  reloc_mode
-    a string indicating the relocation mode; there are three possible
-    values for this string: *keep_group*, *change_group*, and
-    *any_group*, the semantics or which are explained in :ref:`the
-    design document <multi-reloc-detailed-design>`
+  evac_mode
+    specify which instances to evacuate; one of ``primary-only``,
+    ``secondary-only``, ``all``, type *string*
 
-  target_groups
-    this argument is only accepted when ``reloc_mode``, as explained
-    above, is *change_group*; if present, it must either be the empty
-    list, or contain a list of group UUIDs that should be considered for
-    relocating instances to; type *list of strings*
+``change-group`` needs the following request arguments:
 
-Finally, in the case of multi-evacuate, there's one single request
-argument (in addition to ``type``):
+  instances
+    a list of instance names whose group to change; type
+    *list of strings*
 
-  evac_nodes
-    the names of the nodes to be evacuated; type *list of strings*
+  target_groups
+    must either be the empty list, or contain a list of group UUIDs that
+    should be considered for relocating instances to; type
+    *list of strings*
 
 Response message
 ~~~~~~~~~~~~~~~~
@@ -322,12 +325,10 @@ result
   entry in the input message, otherwise Ganeti will consider the result
   as failed
 
-  for multi-relocate mode, this is a list of lists of serialized
-  opcodes. See the :ref:`design document <multi-reloc-result>` for a
-  detailed dscription.
-
-  for multi-evacuation mode, this is a list of lists; each element of
-  the list is a list of instance name and the new secondary node
+  for the ``node-evacuate`` and ``change-group`` modes, this is a
+  dictionary containing, among other information, a list of lists of
+  serialized opcodes; see the :ref:`design document
+  <multi-reloc-result>` for a detailed description
 
 .. note:: Current Ganeti version accepts either ``result`` or ``nodes``
    as a backwards-compatibility measure (older versions only supported
@@ -496,19 +497,6 @@ Input message, reallocation::
     }
   }
 
-Input message, node evacuation::
-
-  {
-    "version": 2,
-    ...
-    "request": {
-      "type": "multi-evacuate",
-      "evac_nodes": [
-        "node2"
-      ],
-    }
-  }
-
 
 Response messages
 ~~~~~~~~~~~~~~~~~