Statistics
| Branch: | Tag: | Revision:

root / man / hroller.rst @ b24e516d

History | View | Annotate | Download (3.7 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

    
28
**[ -O *name...* ]**
29

    
30
**[ --node-tags** *tag,..* **]**
31

    
32
Reporting options:
33

    
34
**[ -v... | -q ]**
35
**[ -S *file* ]**
36
**[ --one-step-only ]**
37

    
38
DESCRIPTION
39
-----------
40

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

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

    
50
ALGORITHM FOR CALCULATING OFFLINE REBOOT GROUPS
51
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52

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

    
62
OPTIONS
63
-------
64

    
65
For a description of the standard options check **htools**\(7) and
66
**hbal**\(1).
67

    
68
\--node-tags *tag,...*
69
  Restrict to nodes having at least one of the given tags.
70

    
71
\--one-step-only
72
  Restrict to the first reboot group. Output the group one node per line.
73

    
74
\--offline-maintenance
75
  Pretend that all instances are shutdown before the reboots are carried
76
  out. I.e., only edges from the primary to the secondary node of an instance
77
  are considered.
78

    
79
\--force
80
  Do not fail, even if the master node cannot be determined.
81

    
82

    
83
BUGS
84
----
85

    
86
Offline nodes should be ignored.
87

    
88
If instances are online the tool should refuse to do offline rolling
89
maintenances, unless explicitly requested.
90

    
91
End-to-end shelltests should be provided.
92

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

    
97
EXAMPLES
98
--------
99

    
100
Online Rolling reboots, using tags
101
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102

    
103
Selecting by tags and getting output for one step only can be used for
104
planing the next maintenance step.
105
::
106

    
107
   $ hroller --node-tags needsreboot --one-step-only -L
108
   'First Reboot Group'
109
    node1.example.com
110
    node3.example.com
111

    
112
Typically these nodes would be drained and migrated.
113
::
114

    
115
   $ GROUP=`hroller --node-tags needsreboot --one-step-only --no-headers -L`
116
   $ for node in $GROUP; do gnt-node modify -D yes $node; done
117
   $ for node in $GROUP; do gnt-node migrate -f --submit $node; done
118

    
119
After maintenance, the tags would be removed and the nodes undrained.
120

    
121

    
122
Offline Rolling node reboot output
123
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
124

    
125
If all instances are shut down, usually larger node groups can be found.
126
::
127

    
128
    $ hroller --offline-maintainance -L
129
    'Node Reboot Groups'
130
    node1.example.com,node3.example.com,node5.example.com
131
    node8.example.com,node6.example.com,node2.example.com
132
    node7.example.com,node4.example.com
133

    
134
.. vim: set textwidth=72 :
135
.. Local Variables:
136
.. mode: rst
137
.. fill-column: 72
138
.. End: