Statistics
| Branch: | Tag: | Revision:

root / man / hroller.rst @ e715a6d6

History | View | Annotate | Download (5.1 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 64ef390e Helga Velroyen
For backends that support identifying the master node (currently
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 52469de0 Klaus Aehlig
For a description of the standard options check **htools**\(1) 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
BUGS
104 3504d6c8 Guido Trotter
----
105 3504d6c8 Guido Trotter
106 1a9eb17e Guido Trotter
If instances are online the tool should refuse to do offline rolling
107 ba258c08 Benjamin Kerensa
maintenances, unless explicitly requested.
108 1a9eb17e Guido Trotter
109 1a9eb17e Guido Trotter
End-to-end shelltests should be provided.
110 1a9eb17e Guido Trotter
111 b24e516d Klaus Aehlig
EXAMPLES
112 b24e516d Klaus Aehlig
--------
113 b24e516d Klaus Aehlig
114 b24e516d Klaus Aehlig
Online Rolling reboots, using tags
115 b24e516d Klaus Aehlig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116 b24e516d Klaus Aehlig
117 b24e516d Klaus Aehlig
Selecting by tags and getting output for one step only can be used for
118 b24e516d Klaus Aehlig
planing the next maintenance step.
119 b24e516d Klaus Aehlig
::
120 b24e516d Klaus Aehlig
121 b24e516d Klaus Aehlig
   $ hroller --node-tags needsreboot --one-step-only -L
122 b24e516d Klaus Aehlig
   'First Reboot Group'
123 b24e516d Klaus Aehlig
    node1.example.com
124 b24e516d Klaus Aehlig
    node3.example.com
125 b24e516d Klaus Aehlig
126 b24e516d Klaus Aehlig
Typically these nodes would be drained and migrated.
127 b24e516d Klaus Aehlig
::
128 b24e516d Klaus Aehlig
129 b24e516d Klaus Aehlig
   $ GROUP=`hroller --node-tags needsreboot --one-step-only --no-headers -L`
130 b24e516d Klaus Aehlig
   $ for node in $GROUP; do gnt-node modify -D yes $node; done
131 b24e516d Klaus Aehlig
   $ for node in $GROUP; do gnt-node migrate -f --submit $node; done
132 b24e516d Klaus Aehlig
133 b24e516d Klaus Aehlig
After maintenance, the tags would be removed and the nodes undrained.
134 b24e516d Klaus Aehlig
135 1a9eb17e Guido Trotter
136 b24e516d Klaus Aehlig
Offline Rolling node reboot output
137 b24e516d Klaus Aehlig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138 1a9eb17e Guido Trotter
139 b24e516d Klaus Aehlig
If all instances are shut down, usually larger node groups can be found.
140 2c9fb8e2 Klaus Aehlig
::
141 1a9eb17e Guido Trotter
142 b24e516d Klaus Aehlig
    $ hroller --offline-maintainance -L
143 1a9eb17e Guido Trotter
    'Node Reboot Groups'
144 1a9eb17e Guido Trotter
    node1.example.com,node3.example.com,node5.example.com
145 1a9eb17e Guido Trotter
    node8.example.com,node6.example.com,node2.example.com
146 1a9eb17e Guido Trotter
    node7.example.com,node4.example.com
147 3504d6c8 Guido Trotter
148 30ce253e Klaus Aehlig
Rolling reboots with non-redundant instances
149 30ce253e Klaus Aehlig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150 30ce253e Klaus Aehlig
151 30ce253e Klaus Aehlig
By default, hroller plans capacity to move the non-redundant instances
152 30ce253e Klaus Aehlig
out of the nodes to be rebooted. If requested, apropriate locations for
153 30ce253e Klaus Aehlig
the non-redundant instances can be shown. The assumption is that instances
154 30ce253e Klaus Aehlig
are moved back to their original node after each reboot; these back moves
155 30ce253e Klaus Aehlig
are not part of the output.
156 30ce253e Klaus Aehlig
::
157 30ce253e Klaus Aehlig
158 30ce253e Klaus Aehlig
    $ hroller --print-moves -L
159 30ce253e Klaus Aehlig
    'Node Reboot Groups'
160 30ce253e Klaus Aehlig
    node-01-002,node-01-003
161 30ce253e Klaus Aehlig
      inst-20 node-01-001
162 30ce253e Klaus Aehlig
      inst-21 node-01-000
163 30ce253e Klaus Aehlig
      inst-30 node-01-005
164 30ce253e Klaus Aehlig
      inst-31 node-01-004
165 30ce253e Klaus Aehlig
    node-01-004,node-01-005
166 30ce253e Klaus Aehlig
      inst-40 node-01-001
167 30ce253e Klaus Aehlig
      inst-41 node-01-000
168 30ce253e Klaus Aehlig
      inst-50 node-01-003
169 30ce253e Klaus Aehlig
      inst-51 node-01-002
170 30ce253e Klaus Aehlig
    node-01-001,node-01-000
171 30ce253e Klaus Aehlig
      inst-00 node-01-002
172 30ce253e Klaus Aehlig
      inst-01 node-01-003
173 30ce253e Klaus Aehlig
      inst-10 node-01-005
174 30ce253e Klaus Aehlig
      inst-11 node-01-004
175 30ce253e Klaus Aehlig
176 30ce253e Klaus Aehlig
177 30ce253e Klaus Aehlig
178 3504d6c8 Guido Trotter
.. vim: set textwidth=72 :
179 3504d6c8 Guido Trotter
.. Local Variables:
180 3504d6c8 Guido Trotter
.. mode: rst
181 3504d6c8 Guido Trotter
.. fill-column: 72
182 3504d6c8 Guido Trotter
.. End: