Statistics
| Branch: | Tag: | Revision:

root / man / hroller.rst @ 30ce253e

History | View | Annotate | Download (5 kB)

1
HROLLER(1) Ganeti | Version @GANETI_VERSION@
2
============================================
3

    
4
NAME
5
----
6

    
7
hroller \- Cluster rolling maintenance scheduler for Ganeti
8

    
9
SYNOPSIS
10
--------
11

    
12
**hroller** {backend options...} [algorithm options...] [reporting options...]
13

    
14
**hroller** \--version
15

    
16

    
17
Backend options:
18

    
19
{ **-m** *cluster* | **-L[** *path* **]** | **-t** *data-file* |
20
**-I** *path* }
21

    
22
**[ --force ]**
23

    
24
Algorithm options:
25

    
26
**[ -G *name* ]**
27
**[ -O *name...* ]**
28
**[ --node-tags** *tag,..* **]**
29
**[ --skip-non-redundant ]**
30

    
31
**[ --offline-maintenance ]**
32
**[ --ignore-non-redundant ]**
33

    
34
Reporting options:
35

    
36
**[ -v... | -q ]**
37
**[ -S *file* ]**
38
**[ --one-step-only ]**
39
**[ --print-moves ]**
40

    
41
DESCRIPTION
42
-----------
43

    
44
hroller is a cluster maintenance reboot scheduler. It can calculate
45
which set of nodes can be rebooted at the same time while avoiding
46
having both primary and secondary nodes being rebooted at the same time.
47

    
48
For backends that support identifying the master node (currenlty
49
RAPI and LUXI), the master node is scheduled as the last node
50
in the last reboot group. Apart from this restriction, larger reboot
51
groups are put first.
52

    
53
ALGORITHM FOR CALCULATING OFFLINE REBOOT GROUPS
54
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55

    
56
hroller will view the nodes as vertices of an undirected graph,
57
with two kind of edges. Firstly, there are edges from the primary
58
to the secondary node of every instance. Secondly, two nodes are connected
59
by an edge if they are the primary nodes of two instances that have the
60
same secondary node. It will then color the graph using a few different
61
heuristics, and return the minimum-size color set found. Node with the same
62
color can then simultaneously migrate all instance off to their respective
63
secondary nodes, and it is safe to reboot them simultaneously.
64

    
65
OPTIONS
66
-------
67

    
68
For a description of the standard options check **htools**\(7) and
69
**hbal**\(1).
70

    
71
\--force
72
  Do not fail, even if the master node cannot be determined.
73

    
74
\--node-tags *tag,...*
75
  Restrict to nodes having at least one of the given tags.
76

    
77
\--skip-non-redundant
78
  Restrict to nodes not hosting any non-redundant instance.
79

    
80
\--offline-maintenance
81
  Pretend that all instances are shutdown before the reboots are carried
82
  out. I.e., only edges from the primary to the secondary node of an instance
83
  are considered.
84

    
85
\--ignore-non-redundnant
86
  Pretend that the non-redundant instances do not exist, and only take
87
  instances with primary and secondary node into account.
88

    
89
\--one-step-only
90
  Restrict to the first reboot group. Output the group one node per line.
91

    
92
\--print-moves
93
  After each group list for each affected non-redundant instance a node
94
  where it can be evacuated to.
95

    
96

    
97
BUGS
98
----
99

    
100
Offline nodes should be ignored.
101

    
102
If instances are online the tool should refuse to do offline rolling
103
maintenances, unless explicitly requested.
104

    
105
End-to-end shelltests should be provided.
106

    
107
Online rolling maintenances (where instance need not be shut down, but
108
are migrated from node to node) are not supported yet. Hroller by design
109
should support them both with and without secondary node replacement.
110

    
111
EXAMPLES
112
--------
113

    
114
Online Rolling reboots, using tags
115
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116

    
117
Selecting by tags and getting output for one step only can be used for
118
planing the next maintenance step.
119
::
120

    
121
   $ hroller --node-tags needsreboot --one-step-only -L
122
   'First Reboot Group'
123
    node1.example.com
124
    node3.example.com
125

    
126
Typically these nodes would be drained and migrated.
127
::
128

    
129
   $ GROUP=`hroller --node-tags needsreboot --one-step-only --no-headers -L`
130
   $ for node in $GROUP; do gnt-node modify -D yes $node; done
131
   $ for node in $GROUP; do gnt-node migrate -f --submit $node; done
132

    
133
After maintenance, the tags would be removed and the nodes undrained.
134

    
135

    
136
Offline Rolling node reboot output
137
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138

    
139
If all instances are shut down, usually larger node groups can be found.
140
::
141

    
142
    $ hroller --offline-maintainance -L
143
    'Node Reboot Groups'
144
    node1.example.com,node3.example.com,node5.example.com
145
    node8.example.com,node6.example.com,node2.example.com
146
    node7.example.com,node4.example.com
147

    
148
Rolling reboots with non-redundant instances
149
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150

    
151
By default, hroller plans capacity to move the non-redundant instances
152
out of the nodes to be rebooted. If requested, apropriate locations for
153
the non-redundant instances can be shown. The assumption is that instances
154
are moved back to their original node after each reboot; these back moves
155
are not part of the output.
156
::
157

    
158
    $ hroller --print-moves -L
159
    'Node Reboot Groups'
160
    node-01-002,node-01-003
161
      inst-20 node-01-001
162
      inst-21 node-01-000
163
      inst-30 node-01-005
164
      inst-31 node-01-004
165
    node-01-004,node-01-005
166
      inst-40 node-01-001
167
      inst-41 node-01-000
168
      inst-50 node-01-003
169
      inst-51 node-01-002
170
    node-01-001,node-01-000
171
      inst-00 node-01-002
172
      inst-01 node-01-003
173
      inst-10 node-01-005
174
      inst-11 node-01-004
175

    
176

    
177

    
178
.. vim: set textwidth=72 :
179
.. Local Variables:
180
.. mode: rst
181
.. fill-column: 72
182
.. End: