Statistics
| Branch: | Tag: | Revision:

root / man / hroller.rst @ 5b6ef0e7

History | View | Annotate | Download (5.3 kB)

1 3504d6c8 Guido Trotter
HROLLER(1) Ganeti | Version @GANETI_VERSION@
2 3504d6c8 Guido Trotter
============================================
3 3504d6c8 Guido Trotter
4 3504d6c8 Guido Trotter
NAME
5 3504d6c8 Guido Trotter
----
6 3504d6c8 Guido Trotter
7 3504d6c8 Guido Trotter
hroller \- Cluster rolling maintenance scheduler for Ganeti
8 3504d6c8 Guido Trotter
9 3504d6c8 Guido Trotter
SYNOPSIS
10 3504d6c8 Guido Trotter
--------
11 3504d6c8 Guido Trotter
12 3504d6c8 Guido Trotter
**hroller** {backend options...} [algorithm options...] [reporting options...]
13 3504d6c8 Guido Trotter
14 3504d6c8 Guido Trotter
**hroller** \--version
15 3504d6c8 Guido Trotter
16 3504d6c8 Guido Trotter
17 3504d6c8 Guido Trotter
Backend options:
18 3504d6c8 Guido Trotter
19 3504d6c8 Guido Trotter
{ **-m** *cluster* | **-L[** *path* **]** | **-t** *data-file* |
20 3504d6c8 Guido Trotter
**-I** *path* }
21 3504d6c8 Guido Trotter
22 52278ef9 Klaus Aehlig
**[ --force ]**
23 52278ef9 Klaus Aehlig
24 3504d6c8 Guido Trotter
Algorithm options:
25 3504d6c8 Guido Trotter
26 2ab65a5d Klaus Aehlig
**[ -G *name* ]**
27 3504d6c8 Guido Trotter
**[ -O *name...* ]**
28 313fdabc Klaus Aehlig
**[ --node-tags** *tag,..* **]**
29 71c41fc0 Klaus Aehlig
**[ --skip-non-redundant ]**
30 71c41fc0 Klaus Aehlig
31 71c41fc0 Klaus Aehlig
**[ --offline-maintenance ]**
32 71c41fc0 Klaus Aehlig
**[ --ignore-non-redundant ]**
33 313fdabc Klaus Aehlig
34 3504d6c8 Guido Trotter
Reporting options:
35 3504d6c8 Guido Trotter
36 3504d6c8 Guido Trotter
**[ -v... | -q ]**
37 3504d6c8 Guido Trotter
**[ -S *file* ]**
38 2207220d Klaus Aehlig
**[ --one-step-only ]**
39 30ce253e Klaus Aehlig
**[ --print-moves ]**
40 3504d6c8 Guido Trotter
41 3504d6c8 Guido Trotter
DESCRIPTION
42 3504d6c8 Guido Trotter
-----------
43 3504d6c8 Guido Trotter
44 3504d6c8 Guido Trotter
hroller is a cluster maintenance reboot scheduler. It can calculate
45 3504d6c8 Guido Trotter
which set of nodes can be rebooted at the same time while avoiding
46 3504d6c8 Guido Trotter
having both primary and secondary nodes being rebooted at the same time.
47 3504d6c8 Guido Trotter
48 2c9fb8e2 Klaus Aehlig
For backends that support identifying the master node (currenlty
49 2c9fb8e2 Klaus Aehlig
RAPI and LUXI), the master node is scheduled as the last node
50 a39779f6 Klaus Aehlig
in the last reboot group. Apart from this restriction, larger reboot
51 a39779f6 Klaus Aehlig
groups are put first.
52 2c9fb8e2 Klaus Aehlig
53 1a9eb17e Guido Trotter
ALGORITHM FOR CALCULATING OFFLINE REBOOT GROUPS
54 1a9eb17e Guido Trotter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 1a9eb17e Guido Trotter
56 1a9eb17e Guido Trotter
hroller will view the nodes as vertices of an undirected graph,
57 8d38fb72 Klaus Aehlig
with two kind of edges. Firstly, there are edges from the primary
58 8d38fb72 Klaus Aehlig
to the secondary node of every instance. Secondly, two nodes are connected
59 8d38fb72 Klaus Aehlig
by an edge if they are the primary nodes of two instances that have the
60 8d38fb72 Klaus Aehlig
same secondary node. It will then color the graph using a few different
61 8d38fb72 Klaus Aehlig
heuristics, and return the minimum-size color set found. Node with the same
62 8d38fb72 Klaus Aehlig
color can then simultaneously migrate all instance off to their respective
63 8d38fb72 Klaus Aehlig
secondary nodes, and it is safe to reboot them simultaneously.
64 1a9eb17e Guido Trotter
65 3504d6c8 Guido Trotter
OPTIONS
66 3504d6c8 Guido Trotter
-------
67 3504d6c8 Guido Trotter
68 52278ef9 Klaus Aehlig
For a description of the standard options check **htools**\(7) and
69 52278ef9 Klaus Aehlig
**hbal**\(1).
70 52278ef9 Klaus Aehlig
71 71c41fc0 Klaus Aehlig
\--force
72 71c41fc0 Klaus Aehlig
  Do not fail, even if the master node cannot be determined.
73 71c41fc0 Klaus Aehlig
74 313fdabc Klaus Aehlig
\--node-tags *tag,...*
75 313fdabc Klaus Aehlig
  Restrict to nodes having at least one of the given tags.
76 313fdabc Klaus Aehlig
77 a12b230c Klaus Aehlig
\--full-evacuation
78 a12b230c Klaus Aehlig
  Also plan moving secondaries out of the nodes to be rebooted. For
79 a12b230c Klaus Aehlig
  each instance the move is at most a migrate (if it was primary
80 a12b230c Klaus Aehlig
  on that node) followed by a replace secondary.
81 a12b230c Klaus Aehlig
82 71c41fc0 Klaus Aehlig
\--skip-non-redundant
83 71c41fc0 Klaus Aehlig
  Restrict to nodes not hosting any non-redundant instance.
84 2207220d Klaus Aehlig
85 8d38fb72 Klaus Aehlig
\--offline-maintenance
86 8d38fb72 Klaus Aehlig
  Pretend that all instances are shutdown before the reboots are carried
87 8d38fb72 Klaus Aehlig
  out. I.e., only edges from the primary to the secondary node of an instance
88 8d38fb72 Klaus Aehlig
  are considered.
89 8d38fb72 Klaus Aehlig
90 71c41fc0 Klaus Aehlig
\--ignore-non-redundnant
91 71c41fc0 Klaus Aehlig
  Pretend that the non-redundant instances do not exist, and only take
92 71c41fc0 Klaus Aehlig
  instances with primary and secondary node into account.
93 71c41fc0 Klaus Aehlig
94 71c41fc0 Klaus Aehlig
\--one-step-only
95 71c41fc0 Klaus Aehlig
  Restrict to the first reboot group. Output the group one node per line.
96 52278ef9 Klaus Aehlig
97 30ce253e Klaus Aehlig
\--print-moves
98 a12b230c Klaus Aehlig
  After each group list for each affected instance a node
99 8e4230a8 Klaus Aehlig
  where it can be evacuated to. The moves are computed under the assumption
100 8e4230a8 Klaus Aehlig
  that after each reboot group, all instances are moved back to their
101 8e4230a8 Klaus Aehlig
  initial position.
102 30ce253e Klaus Aehlig
103 3504d6c8 Guido Trotter
104 3504d6c8 Guido Trotter
BUGS
105 3504d6c8 Guido Trotter
----
106 3504d6c8 Guido Trotter
107 1a9eb17e Guido Trotter
Offline nodes should be ignored.
108 1a9eb17e Guido Trotter
109 1a9eb17e Guido Trotter
If instances are online the tool should refuse to do offline rolling
110 ba258c08 Benjamin Kerensa
maintenances, unless explicitly requested.
111 1a9eb17e Guido Trotter
112 1a9eb17e Guido Trotter
End-to-end shelltests should be provided.
113 1a9eb17e Guido Trotter
114 1a9eb17e Guido Trotter
Online rolling maintenances (where instance need not be shut down, but
115 1a9eb17e Guido Trotter
are migrated from node to node) are not supported yet. Hroller by design
116 1a9eb17e Guido Trotter
should support them both with and without secondary node replacement.
117 1a9eb17e Guido Trotter
118 b24e516d Klaus Aehlig
EXAMPLES
119 b24e516d Klaus Aehlig
--------
120 b24e516d Klaus Aehlig
121 b24e516d Klaus Aehlig
Online Rolling reboots, using tags
122 b24e516d Klaus Aehlig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123 b24e516d Klaus Aehlig
124 b24e516d Klaus Aehlig
Selecting by tags and getting output for one step only can be used for
125 b24e516d Klaus Aehlig
planing the next maintenance step.
126 b24e516d Klaus Aehlig
::
127 b24e516d Klaus Aehlig
128 b24e516d Klaus Aehlig
   $ hroller --node-tags needsreboot --one-step-only -L
129 b24e516d Klaus Aehlig
   'First Reboot Group'
130 b24e516d Klaus Aehlig
    node1.example.com
131 b24e516d Klaus Aehlig
    node3.example.com
132 b24e516d Klaus Aehlig
133 b24e516d Klaus Aehlig
Typically these nodes would be drained and migrated.
134 b24e516d Klaus Aehlig
::
135 b24e516d Klaus Aehlig
136 b24e516d Klaus Aehlig
   $ GROUP=`hroller --node-tags needsreboot --one-step-only --no-headers -L`
137 b24e516d Klaus Aehlig
   $ for node in $GROUP; do gnt-node modify -D yes $node; done
138 b24e516d Klaus Aehlig
   $ for node in $GROUP; do gnt-node migrate -f --submit $node; done
139 b24e516d Klaus Aehlig
140 b24e516d Klaus Aehlig
After maintenance, the tags would be removed and the nodes undrained.
141 b24e516d Klaus Aehlig
142 1a9eb17e Guido Trotter
143 b24e516d Klaus Aehlig
Offline Rolling node reboot output
144 b24e516d Klaus Aehlig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145 1a9eb17e Guido Trotter
146 b24e516d Klaus Aehlig
If all instances are shut down, usually larger node groups can be found.
147 2c9fb8e2 Klaus Aehlig
::
148 1a9eb17e Guido Trotter
149 b24e516d Klaus Aehlig
    $ hroller --offline-maintainance -L
150 1a9eb17e Guido Trotter
    'Node Reboot Groups'
151 1a9eb17e Guido Trotter
    node1.example.com,node3.example.com,node5.example.com
152 1a9eb17e Guido Trotter
    node8.example.com,node6.example.com,node2.example.com
153 1a9eb17e Guido Trotter
    node7.example.com,node4.example.com
154 3504d6c8 Guido Trotter
155 30ce253e Klaus Aehlig
Rolling reboots with non-redundant instances
156 30ce253e Klaus Aehlig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157 30ce253e Klaus Aehlig
158 30ce253e Klaus Aehlig
By default, hroller plans capacity to move the non-redundant instances
159 30ce253e Klaus Aehlig
out of the nodes to be rebooted. If requested, apropriate locations for
160 30ce253e Klaus Aehlig
the non-redundant instances can be shown. The assumption is that instances
161 30ce253e Klaus Aehlig
are moved back to their original node after each reboot; these back moves
162 30ce253e Klaus Aehlig
are not part of the output.
163 30ce253e Klaus Aehlig
::
164 30ce253e Klaus Aehlig
165 30ce253e Klaus Aehlig
    $ hroller --print-moves -L
166 30ce253e Klaus Aehlig
    'Node Reboot Groups'
167 30ce253e Klaus Aehlig
    node-01-002,node-01-003
168 30ce253e Klaus Aehlig
      inst-20 node-01-001
169 30ce253e Klaus Aehlig
      inst-21 node-01-000
170 30ce253e Klaus Aehlig
      inst-30 node-01-005
171 30ce253e Klaus Aehlig
      inst-31 node-01-004
172 30ce253e Klaus Aehlig
    node-01-004,node-01-005
173 30ce253e Klaus Aehlig
      inst-40 node-01-001
174 30ce253e Klaus Aehlig
      inst-41 node-01-000
175 30ce253e Klaus Aehlig
      inst-50 node-01-003
176 30ce253e Klaus Aehlig
      inst-51 node-01-002
177 30ce253e Klaus Aehlig
    node-01-001,node-01-000
178 30ce253e Klaus Aehlig
      inst-00 node-01-002
179 30ce253e Klaus Aehlig
      inst-01 node-01-003
180 30ce253e Klaus Aehlig
      inst-10 node-01-005
181 30ce253e Klaus Aehlig
      inst-11 node-01-004
182 30ce253e Klaus Aehlig
183 30ce253e Klaus Aehlig
184 30ce253e Klaus Aehlig
185 3504d6c8 Guido Trotter
.. vim: set textwidth=72 :
186 3504d6c8 Guido Trotter
.. Local Variables:
187 3504d6c8 Guido Trotter
.. mode: rst
188 3504d6c8 Guido Trotter
.. fill-column: 72
189 3504d6c8 Guido Trotter
.. End: