root / doc / design-multi-reloc.rst @ 7fa310f6
History | View | Annotate | Download (2.9 kB)
1 | 4055b109 | Adeodato Simo | ==================================== |
---|---|---|---|
2 | 4055b109 | Adeodato Simo | Moving instances accross node groups |
3 | 4055b109 | Adeodato Simo | ==================================== |
4 | 4055b109 | Adeodato Simo | |
5 | 4055b109 | Adeodato Simo | This design document explains the changes needed in Ganeti to perform |
6 | 4055b109 | Adeodato Simo | instance moves across node groups. Reader familiarity with the following |
7 | 4055b109 | Adeodato Simo | existing documents is advised: |
8 | 4055b109 | Adeodato Simo | |
9 | 4055b109 | Adeodato Simo | - :doc:`Current IAllocator specification <iallocator>` |
10 | 4055b109 | Adeodato Simo | - :doc:`Shared storage model in 2.3+ <design-shared-storage>` |
11 | 4055b109 | Adeodato Simo | |
12 | 4055b109 | Adeodato Simo | Motivation and and design proposal |
13 | 4055b109 | Adeodato Simo | ================================== |
14 | 4055b109 | Adeodato Simo | |
15 | 4055b109 | Adeodato Simo | At the moment, moving instances away from their primary or secondary |
16 | 4055b109 | Adeodato Simo | nodes with the ``relocate`` and ``multi-evacuate`` IAllocator calls |
17 | 4055b109 | Adeodato Simo | restricts target nodes to those on the same node group. This ensures a |
18 | 4055b109 | Adeodato Simo | mobility domain is never crossed, and allows normal operation of each |
19 | 4055b109 | Adeodato Simo | node group to be confined within itself. |
20 | 4055b109 | Adeodato Simo | |
21 | 4055b109 | Adeodato Simo | It is desirable, however, to have a way of moving instances across node |
22 | 4055b109 | Adeodato Simo | groups so that, for example, it is possible to move a set of instances |
23 | 4055b109 | Adeodato Simo | to another group for policy reasons, or completely empty a given group |
24 | 4055b109 | Adeodato Simo | to perform maintenance operations. |
25 | 4055b109 | Adeodato Simo | |
26 | 4055b109 | Adeodato Simo | To implement this, we propose a new ``multi-relocate`` IAllocator call |
27 | 4055b109 | Adeodato Simo | that will be able to compute inter-group instance moves, taking into |
28 | 4055b109 | Adeodato Simo | account mobility domains as appropriate. The interface proposed below |
29 | 4055b109 | Adeodato Simo | should be enough to cover the use cases mentioned above. |
30 | 4055b109 | Adeodato Simo | |
31 | 4055b109 | Adeodato Simo | Detailed design |
32 | 4055b109 | Adeodato Simo | =============== |
33 | 4055b109 | Adeodato Simo | |
34 | 4055b109 | Adeodato Simo | We introduce a new ``multi-relocate`` IAllocator call whose input will |
35 | 4055b109 | Adeodato Simo | be a list of instances to move, and a "mode of operation" that will |
36 | 4055b109 | Adeodato Simo | determine what groups will be candidates to receive the new instances. |
37 | 4055b109 | Adeodato Simo | |
38 | 4055b109 | Adeodato Simo | The mode of operation will be one of: |
39 | 4055b109 | Adeodato Simo | |
40 | 4055b109 | Adeodato Simo | - *Stay in group*: the instances will be moved off their current nodes, |
41 | 4055b109 | Adeodato Simo | but will stay in the same group; this is what the ``relocate`` call |
42 | 4055b109 | Adeodato Simo | does, but here it can act on multiple instances. (Typically, the |
43 | 4055b109 | Adeodato Simo | source nodes will be marked as drained, to avoid just exchanging |
44 | 4055b109 | Adeodato Simo | instances among them.) |
45 | 4055b109 | Adeodato Simo | |
46 | 4055b109 | Adeodato Simo | - *Change group*: this mode accepts one extra parameter, a list of node |
47 | 4055b109 | Adeodato Simo | group UUIDs; the instances will be moved away from their current |
48 | 4055b109 | Adeodato Simo | group, to any of the groups in this list. If the list is empty, the |
49 | 4055b109 | Adeodato Simo | request is, simply, "change group": the instances are placed in any |
50 | 4055b109 | Adeodato Simo | group but their original one. |
51 | 4055b109 | Adeodato Simo | |
52 | 4055b109 | Adeodato Simo | - *Any*: for each instance, any group is valid, including its current |
53 | 4055b109 | Adeodato Simo | one. |
54 | 4055b109 | Adeodato Simo | |
55 | 4055b109 | Adeodato Simo | In all modes, the groups' ``alloc_policy`` attribute will be honored. |
56 | 4055b109 | Adeodato Simo | |
57 | 4055b109 | Adeodato Simo | Result |
58 | 4055b109 | Adeodato Simo | ------ |
59 | 4055b109 | Adeodato Simo | |
60 | 4055b109 | Adeodato Simo | In all storage models, an inter-group move can be modeled as a sequence |
61 | 4055b109 | Adeodato Simo | of **replace secondary** and **failover** operations (when shared |
62 | 4055b109 | Adeodato Simo | storage is used, they will all be failover operations within the |
63 | 4055b109 | Adeodato Simo | corresponding mobility domain). This will be represented as a list of |
64 | 4055b109 | Adeodato Simo | ``(instance, [operations])`` pairs. |
65 | 4055b109 | Adeodato Simo | |
66 | 4055b109 | Adeodato Simo | For replace secondary operations, a new secondary node must be |
67 | 4055b109 | Adeodato Simo | specified. For failover operations, a node *may* be specified when |
68 | 4055b109 | Adeodato Simo | necessary, e.g. when shared storage is in use and there's no designated |
69 | 4055b109 | Adeodato Simo | secondary for the instance. |
70 | 4055b109 | Adeodato Simo | |
71 | 4055b109 | Adeodato Simo | .. vim: set textwidth=72 : |
72 | 4055b109 | Adeodato Simo | .. Local Variables: |
73 | 4055b109 | Adeodato Simo | .. mode: rst |
74 | 4055b109 | Adeodato Simo | .. fill-column: 72 |
75 | 4055b109 | Adeodato Simo | .. End: |