root / man / hbal.rst @ a317d77a
History | View | Annotate | Download (28 kB)
1 | 5a19bd35 | Iustin Pop | HBAL(1) Ganeti | Version @GANETI_VERSION@ |
---|---|---|---|
2 | 5a19bd35 | Iustin Pop | ========================================= |
3 | 49148d15 | Iustin Pop | |
4 | 49148d15 | Iustin Pop | NAME |
5 | 49148d15 | Iustin Pop | ---- |
6 | 49148d15 | Iustin Pop | |
7 | 49148d15 | Iustin Pop | hbal \- Cluster balancer for Ganeti |
8 | 49148d15 | Iustin Pop | |
9 | 49148d15 | Iustin Pop | SYNOPSIS |
10 | 49148d15 | Iustin Pop | -------- |
11 | 49148d15 | Iustin Pop | |
12 | 49148d15 | Iustin Pop | **hbal** {backend options...} [algorithm options...] [reporting options...] |
13 | 49148d15 | Iustin Pop | |
14 | f624fa95 | Iustin Pop | **hbal** \--version |
15 | 49148d15 | Iustin Pop | |
16 | 49148d15 | Iustin Pop | |
17 | 49148d15 | Iustin Pop | Backend options: |
18 | 49148d15 | Iustin Pop | |
19 | 0547d608 | René Nussbaumer | { **-m** *cluster* | **-L[** *path* **] [-X]** | **-t** *data-file* | |
20 | 0547d608 | René Nussbaumer | **-I** *path* } |
21 | 49148d15 | Iustin Pop | |
22 | 49148d15 | Iustin Pop | Algorithm options: |
23 | 49148d15 | Iustin Pop | |
24 | f624fa95 | Iustin Pop | **[ \--max-cpu *cpu-ratio* ]** |
25 | f624fa95 | Iustin Pop | **[ \--min-disk *disk-ratio* ]** |
26 | 49148d15 | Iustin Pop | **[ -l *limit* ]** |
27 | 49148d15 | Iustin Pop | **[ -e *score* ]** |
28 | f624fa95 | Iustin Pop | **[ -g *delta* ]** **[ \--min-gain-limit *threshold* ]** |
29 | 49148d15 | Iustin Pop | **[ -O *name...* ]** |
30 | f624fa95 | Iustin Pop | **[ \--no-disk-moves ]** |
31 | f624fa95 | Iustin Pop | **[ \--no-instance-moves ]** |
32 | 49148d15 | Iustin Pop | **[ -U *util-file* ]** |
33 | 14b4e045 | Klaus Aehlig | **[ \--ignore-dynu ]** |
34 | 869cea98 | Spyros Trigazis | **[ \--mond *yes|no* ]** |
35 | f624fa95 | Iustin Pop | **[ \--evac-mode ]** |
36 | f624fa95 | Iustin Pop | **[ \--select-instances *inst...* ]** |
37 | f624fa95 | Iustin Pop | **[ \--exclude-instances *inst...* ]** |
38 | 49148d15 | Iustin Pop | |
39 | 49148d15 | Iustin Pop | Reporting options: |
40 | 49148d15 | Iustin Pop | |
41 | 49148d15 | Iustin Pop | **[ -C[ *file* ] ]** |
42 | 49148d15 | Iustin Pop | **[ -p[ *fields* ] ]** |
43 | f624fa95 | Iustin Pop | **[ \--print-instances ]** |
44 | 5a736782 | Guido Trotter | **[ -S *file* ]** |
45 | 49148d15 | Iustin Pop | **[ -v... | -q ]** |
46 | 49148d15 | Iustin Pop | |
47 | 49148d15 | Iustin Pop | |
48 | 49148d15 | Iustin Pop | DESCRIPTION |
49 | 49148d15 | Iustin Pop | ----------- |
50 | 49148d15 | Iustin Pop | |
51 | 49148d15 | Iustin Pop | hbal is a cluster balancer that looks at the current state of the |
52 | 49148d15 | Iustin Pop | cluster (nodes with their total and free disk, memory, etc.) and |
53 | 49148d15 | Iustin Pop | instance placement and computes a series of steps designed to bring |
54 | 49148d15 | Iustin Pop | the cluster into a better state. |
55 | 49148d15 | Iustin Pop | |
56 | 49148d15 | Iustin Pop | The algorithm used is designed to be stable (i.e. it will give you the |
57 | 49148d15 | Iustin Pop | same results when restarting it from the middle of the solution) and |
58 | f624fa95 | Iustin Pop | reasonably fast. It is not, however, designed to be a perfect algorithm: |
59 | f624fa95 | Iustin Pop | it is possible to make it go into a corner from which it can find no |
60 | f624fa95 | Iustin Pop | improvement, because it looks only one "step" ahead. |
61 | 49148d15 | Iustin Pop | |
62 | f30d0610 | Spyros Trigazis | The program accesses the cluster state via Rapi or Luxi. It also |
63 | f30d0610 | Spyros Trigazis | requests data over the network from all MonDs with the --mond option. |
64 | f30d0610 | Spyros Trigazis | Currently it uses only data produced by CPUload collector. |
65 | f30d0610 | Spyros Trigazis | |
66 | 49148d15 | Iustin Pop | By default, the program will show the solution incrementally as it is |
67 | 49148d15 | Iustin Pop | computed, in a somewhat cryptic format; for getting the actual Ganeti |
68 | 49148d15 | Iustin Pop | command list, use the **-C** option. |
69 | 49148d15 | Iustin Pop | |
70 | 49148d15 | Iustin Pop | ALGORITHM |
71 | 49148d15 | Iustin Pop | ~~~~~~~~~ |
72 | 49148d15 | Iustin Pop | |
73 | 49148d15 | Iustin Pop | The program works in independent steps; at each step, we compute the |
74 | 49148d15 | Iustin Pop | best instance move that lowers the cluster score. |
75 | 49148d15 | Iustin Pop | |
76 | 49148d15 | Iustin Pop | The possible move type for an instance are combinations of |
77 | 49148d15 | Iustin Pop | failover/migrate and replace-disks such that we change one of the |
78 | 49148d15 | Iustin Pop | instance nodes, and the other one remains (but possibly with changed |
79 | 49148d15 | Iustin Pop | role, e.g. from primary it becomes secondary). The list is: |
80 | 49148d15 | Iustin Pop | |
81 | 49148d15 | Iustin Pop | - failover (f) |
82 | 49148d15 | Iustin Pop | - replace secondary (r) |
83 | 49148d15 | Iustin Pop | - replace primary, a composite move (f, r, f) |
84 | 49148d15 | Iustin Pop | - failover and replace secondary, also composite (f, r) |
85 | 49148d15 | Iustin Pop | - replace secondary and failover, also composite (r, f) |
86 | 49148d15 | Iustin Pop | |
87 | 49148d15 | Iustin Pop | We don't do the only remaining possibility of replacing both nodes |
88 | 49148d15 | Iustin Pop | (r,f,r,f or the equivalent f,r,f,r) since these move needs an |
89 | 49148d15 | Iustin Pop | exhaustive search over both candidate primary and secondary nodes, and |
90 | 49148d15 | Iustin Pop | is O(n*n) in the number of nodes. Furthermore, it doesn't seems to |
91 | 49148d15 | Iustin Pop | give better scores but will result in more disk replacements. |
92 | 49148d15 | Iustin Pop | |
93 | 49148d15 | Iustin Pop | PLACEMENT RESTRICTIONS |
94 | 49148d15 | Iustin Pop | ~~~~~~~~~~~~~~~~~~~~~~ |
95 | 49148d15 | Iustin Pop | |
96 | 49148d15 | Iustin Pop | At each step, we prevent an instance move if it would cause: |
97 | 49148d15 | Iustin Pop | |
98 | 49148d15 | Iustin Pop | - a node to go into N+1 failure state |
99 | 49148d15 | Iustin Pop | - an instance to move onto an offline node (offline nodes are either |
100 | 325947e7 | Klaus Aehlig | read from the cluster or declared with *-O*; drained nodes are |
101 | 325947e7 | Klaus Aehlig | considered offline) |
102 | 49148d15 | Iustin Pop | - an exclusion-tag based conflict (exclusion tags are read from the |
103 | f624fa95 | Iustin Pop | cluster and/or defined via the *\--exclusion-tags* option) |
104 | f624fa95 | Iustin Pop | - a max vcpu/pcpu ratio to be exceeded (configured via *\--max-cpu*) |
105 | 49148d15 | Iustin Pop | - min disk free percentage to go below the configured limit |
106 | f624fa95 | Iustin Pop | (configured via *\--min-disk*) |
107 | 49148d15 | Iustin Pop | |
108 | 49148d15 | Iustin Pop | CLUSTER SCORING |
109 | 49148d15 | Iustin Pop | ~~~~~~~~~~~~~~~ |
110 | 49148d15 | Iustin Pop | |
111 | 49148d15 | Iustin Pop | As said before, the algorithm tries to minimise the cluster score at |
112 | 325947e7 | Klaus Aehlig | each step. Currently this score is computed as a weighted sum of the |
113 | 325947e7 | Klaus Aehlig | following components: |
114 | 49148d15 | Iustin Pop | |
115 | 49148d15 | Iustin Pop | - standard deviation of the percent of free memory |
116 | 49148d15 | Iustin Pop | - standard deviation of the percent of reserved memory |
117 | 49148d15 | Iustin Pop | - standard deviation of the percent of free disk |
118 | 49148d15 | Iustin Pop | - count of nodes failing N+1 check |
119 | 49148d15 | Iustin Pop | - count of instances living (either as primary or secondary) on |
120 | 325947e7 | Klaus Aehlig | offline nodes; in the sense of hbal (and the other htools) drained |
121 | 325947e7 | Klaus Aehlig | nodes are considered offline |
122 | 49148d15 | Iustin Pop | - count of instances living (as primary) on offline nodes; this |
123 | 49148d15 | Iustin Pop | differs from the above metric by helping failover of such instances |
124 | 49148d15 | Iustin Pop | in 2-node clusters |
125 | 49148d15 | Iustin Pop | - standard deviation of the ratio of virtual-to-physical cpus (for |
126 | 49148d15 | Iustin Pop | primary instances of the node) |
127 | 49148d15 | Iustin Pop | - standard deviation of the dynamic load on the nodes, for cpus, |
128 | 49148d15 | Iustin Pop | memory, disk and network |
129 | f30d0610 | Spyros Trigazis | - standard deviation of the CPU load provided by MonD |
130 | 49148d15 | Iustin Pop | |
131 | 49148d15 | Iustin Pop | The free memory and free disk values help ensure that all nodes are |
132 | 49148d15 | Iustin Pop | somewhat balanced in their resource usage. The reserved memory helps |
133 | 49148d15 | Iustin Pop | to ensure that nodes are somewhat balanced in holding secondary |
134 | 49148d15 | Iustin Pop | instances, and that no node keeps too much memory reserved for |
135 | 49148d15 | Iustin Pop | N+1. And finally, the N+1 percentage helps guide the algorithm towards |
136 | 49148d15 | Iustin Pop | eliminating N+1 failures, if possible. |
137 | 49148d15 | Iustin Pop | |
138 | 49148d15 | Iustin Pop | Except for the N+1 failures and offline instances counts, we use the |
139 | 49148d15 | Iustin Pop | standard deviation since when used with values within a fixed range |
140 | 49148d15 | Iustin Pop | (we use percents expressed as values between zero and one) it gives |
141 | 49148d15 | Iustin Pop | consistent results across all metrics (there are some small issues |
142 | 49148d15 | Iustin Pop | related to different means, but it works generally well). The 'count' |
143 | 49148d15 | Iustin Pop | type values will have higher score and thus will matter more for |
144 | 49148d15 | Iustin Pop | balancing; thus these are better for hard constraints (like evacuating |
145 | 49148d15 | Iustin Pop | nodes and fixing N+1 failures). For example, the offline instances |
146 | 49148d15 | Iustin Pop | count (i.e. the number of instances living on offline nodes) will |
147 | 49148d15 | Iustin Pop | cause the algorithm to actively move instances away from offline |
148 | 49148d15 | Iustin Pop | nodes. This, coupled with the restriction on placement given by |
149 | 49148d15 | Iustin Pop | offline nodes, will cause evacuation of such nodes. |
150 | 49148d15 | Iustin Pop | |
151 | 49148d15 | Iustin Pop | The dynamic load values need to be read from an external file (Ganeti |
152 | 49148d15 | Iustin Pop | doesn't supply them), and are computed for each node as: sum of |
153 | 49148d15 | Iustin Pop | primary instance cpu load, sum of primary instance memory load, sum of |
154 | 49148d15 | Iustin Pop | primary and secondary instance disk load (as DRBD generates write load |
155 | 49148d15 | Iustin Pop | on secondary nodes too in normal case and in degraded scenarios also |
156 | 49148d15 | Iustin Pop | read load), and sum of primary instance network load. An example of |
157 | 49148d15 | Iustin Pop | how to generate these values for input to hbal would be to track ``xm |
158 | 49148d15 | Iustin Pop | list`` for instances over a day and by computing the delta of the cpu |
159 | 49148d15 | Iustin Pop | values, and feed that via the *-U* option for all instances (and keep |
160 | 49148d15 | Iustin Pop | the other metrics as one). For the algorithm to work, all that is |
161 | 49148d15 | Iustin Pop | needed is that the values are consistent for a metric across all |
162 | 49148d15 | Iustin Pop | instances (e.g. all instances use cpu% to report cpu usage, and not |
163 | 49148d15 | Iustin Pop | something related to number of CPU seconds used if the CPUs are |
164 | 49148d15 | Iustin Pop | different), and that they are normalised to between zero and one. Note |
165 | 49148d15 | Iustin Pop | that it's recommended to not have zero as the load value for any |
166 | 49148d15 | Iustin Pop | instance metric since then secondary instances are not well balanced. |
167 | 49148d15 | Iustin Pop | |
168 | f30d0610 | Spyros Trigazis | The CPUload from MonD's data collector will be used only if all MonDs |
169 | f30d0610 | Spyros Trigazis | are running, otherwise it won't affect the cluster score. Since we can't |
170 | f30d0610 | Spyros Trigazis | find the CPU load of each instance, we can assume that the CPU load of |
171 | f30d0610 | Spyros Trigazis | an instance is proportional to the number of its vcpus. With this |
172 | f30d0610 | Spyros Trigazis | heuristic, instances from nodes with high CPU load will tend to move to |
173 | f30d0610 | Spyros Trigazis | nodes with less CPU load. |
174 | f30d0610 | Spyros Trigazis | |
175 | 49148d15 | Iustin Pop | On a perfectly balanced cluster (all nodes the same size, all |
176 | 49148d15 | Iustin Pop | instances the same size and spread across the nodes equally), the |
177 | 49148d15 | Iustin Pop | values for all metrics would be zero. This doesn't happen too often in |
178 | 49148d15 | Iustin Pop | practice :) |
179 | 49148d15 | Iustin Pop | |
180 | 49148d15 | Iustin Pop | OFFLINE INSTANCES |
181 | 49148d15 | Iustin Pop | ~~~~~~~~~~~~~~~~~ |
182 | 49148d15 | Iustin Pop | |
183 | 49148d15 | Iustin Pop | Since current Ganeti versions do not report the memory used by offline |
184 | 49148d15 | Iustin Pop | (down) instances, ignoring the run status of instances will cause |
185 | 49148d15 | Iustin Pop | wrong calculations. For this reason, the algorithm subtracts the |
186 | 49148d15 | Iustin Pop | memory size of down instances from the free node memory of their |
187 | 49148d15 | Iustin Pop | primary node, in effect simulating the startup of such instances. |
188 | 49148d15 | Iustin Pop | |
189 | 49148d15 | Iustin Pop | EXCLUSION TAGS |
190 | 49148d15 | Iustin Pop | ~~~~~~~~~~~~~~ |
191 | 49148d15 | Iustin Pop | |
192 | 49148d15 | Iustin Pop | The exclusion tags mechanism is designed to prevent instances which |
193 | 49148d15 | Iustin Pop | run the same workload (e.g. two DNS servers) to land on the same node, |
194 | 49148d15 | Iustin Pop | which would make the respective node a SPOF for the given service. |
195 | 49148d15 | Iustin Pop | |
196 | 49148d15 | Iustin Pop | It works by tagging instances with certain tags and then building |
197 | 49148d15 | Iustin Pop | exclusion maps based on these. Which tags are actually used is |
198 | f624fa95 | Iustin Pop | configured either via the command line (option *\--exclusion-tags*) |
199 | 49148d15 | Iustin Pop | or via adding them to the cluster tags: |
200 | 49148d15 | Iustin Pop | |
201 | f624fa95 | Iustin Pop | \--exclusion-tags=a,b |
202 | 49148d15 | Iustin Pop | This will make all instance tags of the form *a:\**, *b:\** be |
203 | 49148d15 | Iustin Pop | considered for the exclusion map |
204 | 49148d15 | Iustin Pop | |
205 | 49148d15 | Iustin Pop | cluster tags *htools:iextags:a*, *htools:iextags:b* |
206 | 49148d15 | Iustin Pop | This will make instance tags *a:\**, *b:\** be considered for the |
207 | 49148d15 | Iustin Pop | exclusion map. More precisely, the suffix of cluster tags starting |
208 | 49148d15 | Iustin Pop | with *htools:iextags:* will become the prefix of the exclusion tags. |
209 | 49148d15 | Iustin Pop | |
210 | 49148d15 | Iustin Pop | Both the above forms mean that two instances both having (e.g.) the |
211 | 49148d15 | Iustin Pop | tag *a:foo* or *b:bar* won't end on the same node. |
212 | 49148d15 | Iustin Pop | |
213 | 49148d15 | Iustin Pop | OPTIONS |
214 | 49148d15 | Iustin Pop | ------- |
215 | 49148d15 | Iustin Pop | |
216 | 49148d15 | Iustin Pop | The options that can be passed to the program are as follows: |
217 | 49148d15 | Iustin Pop | |
218 | f624fa95 | Iustin Pop | -C, \--print-commands |
219 | 49148d15 | Iustin Pop | Print the command list at the end of the run. Without this, the |
220 | 49148d15 | Iustin Pop | program will only show a shorter, but cryptic output. |
221 | 49148d15 | Iustin Pop | |
222 | 49148d15 | Iustin Pop | Note that the moves list will be split into independent steps, |
223 | 49148d15 | Iustin Pop | called "jobsets", but only for visual inspection, not for actually |
224 | 49148d15 | Iustin Pop | parallelisation. It is not possible to parallelise these directly |
225 | 49148d15 | Iustin Pop | when executed via "gnt-instance" commands, since a compound command |
226 | 49148d15 | Iustin Pop | (e.g. failover and replace-disks) must be executed |
227 | 49148d15 | Iustin Pop | serially. Parallel execution is only possible when using the Luxi |
228 | 49148d15 | Iustin Pop | backend and the *-L* option. |
229 | 49148d15 | Iustin Pop | |
230 | 49148d15 | Iustin Pop | The algorithm for splitting the moves into jobsets is by |
231 | 49148d15 | Iustin Pop | accumulating moves until the next move is touching nodes already |
232 | 49148d15 | Iustin Pop | touched by the current moves; this means we can't execute in |
233 | 49148d15 | Iustin Pop | parallel (due to resource allocation in Ganeti) and thus we start a |
234 | 49148d15 | Iustin Pop | new jobset. |
235 | 49148d15 | Iustin Pop | |
236 | f624fa95 | Iustin Pop | -p, \--print-nodes |
237 | d7731f51 | Iustin Pop | Prints the before and after node status, in a format designed to allow |
238 | d7731f51 | Iustin Pop | the user to understand the node's most important parameters. See the |
239 | 354c4f62 | Michael Hanselmann | man page **htools**\(1) for more details about this option. |
240 | 49148d15 | Iustin Pop | |
241 | f624fa95 | Iustin Pop | \--print-instances |
242 | 49148d15 | Iustin Pop | Prints the before and after instance map. This is less useful as the |
243 | 49148d15 | Iustin Pop | node status, but it can help in understanding instance moves. |
244 | 49148d15 | Iustin Pop | |
245 | 49148d15 | Iustin Pop | -O *name* |
246 | 49148d15 | Iustin Pop | This option (which can be given multiple times) will mark nodes as |
247 | 49148d15 | Iustin Pop | being *offline*. This means a couple of things: |
248 | 49148d15 | Iustin Pop | |
249 | 49148d15 | Iustin Pop | - instances won't be placed on these nodes, not even temporarily; |
250 | 49148d15 | Iustin Pop | e.g. the *replace primary* move is not available if the secondary |
251 | 49148d15 | Iustin Pop | node is offline, since this move requires a failover. |
252 | 49148d15 | Iustin Pop | - these nodes will not be included in the score calculation (except |
253 | 49148d15 | Iustin Pop | for the percentage of instances on offline nodes) |
254 | 49148d15 | Iustin Pop | |
255 | 49148d15 | Iustin Pop | Note that algorithm will also mark as offline any nodes which are |
256 | 49148d15 | Iustin Pop | reported by RAPI as such, or that have "?" in file-based input in |
257 | 49148d15 | Iustin Pop | any numeric fields. |
258 | 49148d15 | Iustin Pop | |
259 | f624fa95 | Iustin Pop | -e *score*, \--min-score=*score* |
260 | 49148d15 | Iustin Pop | This parameter denotes the minimum score we are happy with and alters |
261 | 49148d15 | Iustin Pop | the computation in two ways: |
262 | 49148d15 | Iustin Pop | |
263 | 49148d15 | Iustin Pop | - if the cluster has the initial score lower than this value, then we |
264 | 49148d15 | Iustin Pop | don't enter the algorithm at all, and exit with success |
265 | 49148d15 | Iustin Pop | - during the iterative process, if we reach a score lower than this |
266 | 49148d15 | Iustin Pop | value, we exit the algorithm |
267 | 49148d15 | Iustin Pop | |
268 | 49148d15 | Iustin Pop | The default value of the parameter is currently ``1e-9`` (chosen |
269 | 49148d15 | Iustin Pop | empirically). |
270 | 49148d15 | Iustin Pop | |
271 | f624fa95 | Iustin Pop | -g *delta*, \--min-gain=*delta* |
272 | 49148d15 | Iustin Pop | Since the balancing algorithm can sometimes result in just very tiny |
273 | 49148d15 | Iustin Pop | improvements, that bring less gain that they cost in relocation |
274 | 49148d15 | Iustin Pop | time, this parameter (defaulting to 0.01) represents the minimum |
275 | 49148d15 | Iustin Pop | gain we require during a step, to continue balancing. |
276 | 49148d15 | Iustin Pop | |
277 | f624fa95 | Iustin Pop | \--min-gain-limit=*threshold* |
278 | 49148d15 | Iustin Pop | The above min-gain option will only take effect if the cluster score |
279 | 49148d15 | Iustin Pop | is already below *threshold* (defaults to 0.1). The rationale behind |
280 | 49148d15 | Iustin Pop | this setting is that at high cluster scores (badly balanced |
281 | 49148d15 | Iustin Pop | clusters), we don't want to abort the rebalance too quickly, as |
282 | 49148d15 | Iustin Pop | later gains might still be significant. However, under the |
283 | 49148d15 | Iustin Pop | threshold, the total gain is only the threshold value, so we can |
284 | 49148d15 | Iustin Pop | exit early. |
285 | 49148d15 | Iustin Pop | |
286 | f624fa95 | Iustin Pop | \--no-disk-moves |
287 | 49148d15 | Iustin Pop | This parameter prevents hbal from using disk move |
288 | 49148d15 | Iustin Pop | (i.e. "gnt-instance replace-disks") operations. This will result in |
289 | 49148d15 | Iustin Pop | a much quicker balancing, but of course the improvements are |
290 | 49148d15 | Iustin Pop | limited. It is up to the user to decide when to use one or another. |
291 | 49148d15 | Iustin Pop | |
292 | f624fa95 | Iustin Pop | \--no-instance-moves |
293 | 0aa71dbd | Guido Trotter | This parameter prevents hbal from using instance moves |
294 | 0aa71dbd | Guido Trotter | (i.e. "gnt-instance migrate/failover") operations. This will only use |
295 | 0aa71dbd | Guido Trotter | the slow disk-replacement operations, and will also provide a worse |
296 | 0aa71dbd | Guido Trotter | balance, but can be useful if moving instances around is deemed unsafe |
297 | 0aa71dbd | Guido Trotter | or not preferred. |
298 | 0aa71dbd | Guido Trotter | |
299 | f624fa95 | Iustin Pop | \--evac-mode |
300 | 49148d15 | Iustin Pop | This parameter restricts the list of instances considered for moving |
301 | 49148d15 | Iustin Pop | to the ones living on offline/drained nodes. It can be used as a |
302 | 49148d15 | Iustin Pop | (bulk) replacement for Ganeti's own *gnt-node evacuate*, with the |
303 | 49148d15 | Iustin Pop | note that it doesn't guarantee full evacuation. |
304 | 49148d15 | Iustin Pop | |
305 | f624fa95 | Iustin Pop | \--select-instances=*instances* |
306 | bcd87e22 | Guido Trotter | This parameter marks the given instances (as a comma-separated list) |
307 | bcd87e22 | Guido Trotter | as the only ones being moved during the rebalance. |
308 | bcd87e22 | Guido Trotter | |
309 | f624fa95 | Iustin Pop | \--exclude-instances=*instances* |
310 | 49148d15 | Iustin Pop | This parameter marks the given instances (as a comma-separated list) |
311 | 49148d15 | Iustin Pop | from being moved during the rebalance. |
312 | 49148d15 | Iustin Pop | |
313 | 49148d15 | Iustin Pop | -U *util-file* |
314 | 49148d15 | Iustin Pop | This parameter specifies a file holding instance dynamic utilisation |
315 | 49148d15 | Iustin Pop | information that will be used to tweak the balancing algorithm to |
316 | 49148d15 | Iustin Pop | equalise load on the nodes (as opposed to static resource |
317 | 49148d15 | Iustin Pop | usage). The file is in the format "instance_name cpu_util mem_util |
318 | 49148d15 | Iustin Pop | disk_util net_util" where the "_util" parameters are interpreted as |
319 | 49148d15 | Iustin Pop | numbers and the instance name must match exactly the instance as |
320 | 49148d15 | Iustin Pop | read from Ganeti. In case of unknown instance names, the program |
321 | 49148d15 | Iustin Pop | will abort. |
322 | 49148d15 | Iustin Pop | |
323 | 49148d15 | Iustin Pop | If not given, the default values are one for all metrics and thus |
324 | 49148d15 | Iustin Pop | dynamic utilisation has only one effect on the algorithm: the |
325 | 49148d15 | Iustin Pop | equalisation of the secondary instances across nodes (this is the |
326 | 49148d15 | Iustin Pop | only metric that is not tracked by another, dedicated value, and |
327 | 49148d15 | Iustin Pop | thus the disk load of instances will cause secondary instance |
328 | 49148d15 | Iustin Pop | equalisation). Note that value of one will also influence slightly |
329 | 49148d15 | Iustin Pop | the primary instance count, but that is already tracked via other |
330 | 49148d15 | Iustin Pop | metrics and thus the influence of the dynamic utilisation will be |
331 | 49148d15 | Iustin Pop | practically insignificant. |
332 | 49148d15 | Iustin Pop | |
333 | 14b4e045 | Klaus Aehlig | \--ignore-dynu |
334 | 14b4e045 | Klaus Aehlig | If given, all dynamic utilisation information will be ignored by |
335 | 14b4e045 | Klaus Aehlig | assuming it to be 0. This option will take precedence over any data |
336 | f30d0610 | Spyros Trigazis | passed by the ``-U`` option or by the MonDs with the ``--mond`` and |
337 | f30d0610 | Spyros Trigazis | the ``--mond-data`` option. |
338 | 14b4e045 | Klaus Aehlig | |
339 | f624fa95 | Iustin Pop | -S *filename*, \--save-cluster=*filename* |
340 | 4188449c | Iustin Pop | If given, the state of the cluster before the balancing is saved to |
341 | 4188449c | Iustin Pop | the given file plus the extension "original" |
342 | 4188449c | Iustin Pop | (i.e. *filename*.original), and the state at the end of the |
343 | 4188449c | Iustin Pop | balancing is saved to the given file plus the extension "balanced" |
344 | 4188449c | Iustin Pop | (i.e. *filename*.balanced). This allows re-feeding the cluster state |
345 | acd9fa11 | Iustin Pop | to either hbal itself or for example hspace via the ``-t`` option. |
346 | acd9fa11 | Iustin Pop | |
347 | f624fa95 | Iustin Pop | -t *datafile*, \--text-data=*datafile* |
348 | acd9fa11 | Iustin Pop | Backend specification: the name of the file holding node and instance |
349 | acd9fa11 | Iustin Pop | information (if not collecting via RAPI or LUXI). This or one of the |
350 | acd9fa11 | Iustin Pop | other backends must be selected. The option is described in the man |
351 | 354c4f62 | Michael Hanselmann | page **htools**\(1). |
352 | 49148d15 | Iustin Pop | |
353 | 869cea98 | Spyros Trigazis | \--mond=*yes|no* |
354 | f30d0610 | Spyros Trigazis | If given the program will query all MonDs to fetch data from the |
355 | f30d0610 | Spyros Trigazis | supported data collectors over the network. |
356 | f30d0610 | Spyros Trigazis | |
357 | f30d0610 | Spyros Trigazis | \--mond-data *datafile* |
358 | f30d0610 | Spyros Trigazis | The name of the file holding the data provided by MonD, to override |
359 | f30d0610 | Spyros Trigazis | quering MonDs over the network. This is mostly used for debugging. The |
360 | f30d0610 | Spyros Trigazis | file must be in JSON format and present an array of JSON objects , |
361 | f30d0610 | Spyros Trigazis | one for every node, with two members. The first member named ``node`` |
362 | f30d0610 | Spyros Trigazis | is the name of the node and the second member named ``reports`` is an |
363 | f30d0610 | Spyros Trigazis | array of report objects. The report objects must be in the same format |
364 | f30d0610 | Spyros Trigazis | as produced by the monitoring agent. |
365 | f30d0610 | Spyros Trigazis | |
366 | 49148d15 | Iustin Pop | -m *cluster* |
367 | acd9fa11 | Iustin Pop | Backend specification: collect data directly from the *cluster* given |
368 | acd9fa11 | Iustin Pop | as an argument via RAPI. The option is described in the man page |
369 | 354c4f62 | Michael Hanselmann | **htools**\(1). |
370 | 49148d15 | Iustin Pop | |
371 | 49148d15 | Iustin Pop | -L [*path*] |
372 | acd9fa11 | Iustin Pop | Backend specification: collect data directly from the master daemon, |
373 | acd9fa11 | Iustin Pop | which is to be contacted via LUXI (an internal Ganeti protocol). The |
374 | 354c4f62 | Michael Hanselmann | option is described in the man page **htools**\(1). |
375 | 49148d15 | Iustin Pop | |
376 | 49148d15 | Iustin Pop | -X |
377 | 49148d15 | Iustin Pop | When using the Luxi backend, hbal can also execute the given |
378 | 49148d15 | Iustin Pop | commands. The execution method is to execute the individual jobsets |
379 | 49148d15 | Iustin Pop | (see the *-C* option for details) in separate stages, aborting if at |
380 | 49148d15 | Iustin Pop | any time a jobset doesn't have all jobs successful. Each step in the |
381 | 49148d15 | Iustin Pop | balancing solution will be translated into exactly one Ganeti job |
382 | 49148d15 | Iustin Pop | (having between one and three OpCodes), and all the steps in a |
383 | 49148d15 | Iustin Pop | jobset will be executed in parallel. The jobsets themselves are |
384 | 49148d15 | Iustin Pop | executed serially. |
385 | 49148d15 | Iustin Pop | |
386 | 2b634302 | Iustin Pop | The execution of the job series can be interrupted, see below for |
387 | 2b634302 | Iustin Pop | signal handling. |
388 | 2b634302 | Iustin Pop | |
389 | f624fa95 | Iustin Pop | -l *N*, \--max-length=*N* |
390 | 49148d15 | Iustin Pop | Restrict the solution to this length. This can be used for example |
391 | 49148d15 | Iustin Pop | to automate the execution of the balancing. |
392 | 49148d15 | Iustin Pop | |
393 | f624fa95 | Iustin Pop | \--max-cpu=*cpu-ratio* |
394 | f815aa89 | Iustin Pop | The maximum virtual to physical cpu ratio, as a floating point number |
395 | f815aa89 | Iustin Pop | greater than or equal to one. For example, specifying *cpu-ratio* as |
396 | f815aa89 | Iustin Pop | **2.5** means that, for a 4-cpu machine, a maximum of 10 virtual cpus |
397 | f815aa89 | Iustin Pop | should be allowed to be in use for primary instances. A value of |
398 | f815aa89 | Iustin Pop | exactly one means there will be no over-subscription of CPU (except |
399 | f815aa89 | Iustin Pop | for the CPU time used by the node itself), and values below one do not |
400 | f815aa89 | Iustin Pop | make sense, as that means other resources (e.g. disk) won't be fully |
401 | f815aa89 | Iustin Pop | utilised due to CPU restrictions. |
402 | 49148d15 | Iustin Pop | |
403 | f624fa95 | Iustin Pop | \--min-disk=*disk-ratio* |
404 | 49148d15 | Iustin Pop | The minimum amount of free disk space remaining, as a floating point |
405 | 49148d15 | Iustin Pop | number. For example, specifying *disk-ratio* as **0.25** means that |
406 | 49148d15 | Iustin Pop | at least one quarter of disk space should be left free on nodes. |
407 | 49148d15 | Iustin Pop | |
408 | f624fa95 | Iustin Pop | -G *uuid*, \--group=*uuid* |
409 | 646aa028 | Iustin Pop | On an multi-group cluster, select this group for |
410 | 646aa028 | Iustin Pop | processing. Otherwise hbal will abort, since it cannot balance |
411 | 646aa028 | Iustin Pop | multiple groups at the same time. |
412 | 646aa028 | Iustin Pop | |
413 | f624fa95 | Iustin Pop | -v, \--verbose |
414 | 49148d15 | Iustin Pop | Increase the output verbosity. Each usage of this option will |
415 | 49148d15 | Iustin Pop | increase the verbosity (currently more than 2 doesn't make sense) |
416 | 49148d15 | Iustin Pop | from the default of one. |
417 | 49148d15 | Iustin Pop | |
418 | f624fa95 | Iustin Pop | -q, \--quiet |
419 | 49148d15 | Iustin Pop | Decrease the output verbosity. Each usage of this option will |
420 | 49148d15 | Iustin Pop | decrease the verbosity (less than zero doesn't make sense) from the |
421 | 49148d15 | Iustin Pop | default of one. |
422 | 49148d15 | Iustin Pop | |
423 | f624fa95 | Iustin Pop | -V, \--version |
424 | 49148d15 | Iustin Pop | Just show the program version and exit. |
425 | 49148d15 | Iustin Pop | |
426 | 2b634302 | Iustin Pop | SIGNAL HANDLING |
427 | 2b634302 | Iustin Pop | --------------- |
428 | 2b634302 | Iustin Pop | |
429 | 2b634302 | Iustin Pop | When executing jobs via LUXI (using the ``-X`` option), normally hbal |
430 | 2b634302 | Iustin Pop | will execute all jobs until either one errors out or all the jobs finish |
431 | 2b634302 | Iustin Pop | successfully. |
432 | 2b634302 | Iustin Pop | |
433 | 2b634302 | Iustin Pop | Since balancing can take a long time, it is possible to stop hbal early |
434 | 2b634302 | Iustin Pop | in two ways: |
435 | 2b634302 | Iustin Pop | |
436 | 2b634302 | Iustin Pop | - by sending a ``SIGINT`` (``^C``), hbal will register the termination |
437 | 2b634302 | Iustin Pop | request, and will wait until the currently submitted jobs finish, at |
438 | 2d6bdcc5 | Iustin Pop | which point it will exit (with exit code 0 if all jobs finished |
439 | 2d6bdcc5 | Iustin Pop | correctly, otherwise with exit code 1 as usual) |
440 | 2d6bdcc5 | Iustin Pop | |
441 | 2b634302 | Iustin Pop | - by sending a ``SIGTERM``, hbal will immediately exit (with exit code |
442 | 2d6bdcc5 | Iustin Pop | 2\); it is the responsibility of the user to follow up with Ganeti |
443 | 2d6bdcc5 | Iustin Pop | and check the result of the currently-executing jobs |
444 | 2b634302 | Iustin Pop | |
445 | 2b634302 | Iustin Pop | Note that in any situation, it's perfectly safe to kill hbal, either via |
446 | 2b634302 | Iustin Pop | the above signals or via any other signal (e.g. ``SIGQUIT``, |
447 | 2b634302 | Iustin Pop | ``SIGKILL``), since the jobs themselves are processed by Ganeti whereas |
448 | 2b634302 | Iustin Pop | hbal (after submission) only watches their progression. In this case, |
449 | 2d6bdcc5 | Iustin Pop | the user will have to query Ganeti for job results. |
450 | 2b634302 | Iustin Pop | |
451 | 49148d15 | Iustin Pop | EXIT STATUS |
452 | 49148d15 | Iustin Pop | ----------- |
453 | 49148d15 | Iustin Pop | |
454 | 2b634302 | Iustin Pop | The exit status of the command will be zero, unless for some reason the |
455 | 2a2e2610 | Iustin Pop | algorithm failed (e.g. wrong node or instance data), invalid command |
456 | 2a2e2610 | Iustin Pop | line options, or (in case of job execution) one of the jobs has failed. |
457 | 2a2e2610 | Iustin Pop | |
458 | 2a2e2610 | Iustin Pop | Once job execution via Luxi has started (``-X``), if the balancing was |
459 | 2a2e2610 | Iustin Pop | interrupted early (via *SIGINT*, or via ``--max-length``) but all jobs |
460 | 2a2e2610 | Iustin Pop | executed successfully, then the exit status is zero; a non-zero exit |
461 | 2a2e2610 | Iustin Pop | code means that the cluster state should be investigated, since a job |
462 | 2a2e2610 | Iustin Pop | failed or we couldn't compute its status and this can also point to a |
463 | 2a2e2610 | Iustin Pop | problem on the Ganeti side. |
464 | 49148d15 | Iustin Pop | |
465 | 49148d15 | Iustin Pop | BUGS |
466 | 49148d15 | Iustin Pop | ---- |
467 | 49148d15 | Iustin Pop | |
468 | 2b634302 | Iustin Pop | The program does not check all its input data for consistency, and |
469 | 2b634302 | Iustin Pop | sometime aborts with cryptic errors messages with invalid data. |
470 | 49148d15 | Iustin Pop | |
471 | 49148d15 | Iustin Pop | The algorithm is not perfect. |
472 | 49148d15 | Iustin Pop | |
473 | 49148d15 | Iustin Pop | EXAMPLE |
474 | 49148d15 | Iustin Pop | ------- |
475 | 49148d15 | Iustin Pop | |
476 | 49148d15 | Iustin Pop | Note that these examples are not for the latest version (they don't |
477 | 49148d15 | Iustin Pop | have full node data). |
478 | 49148d15 | Iustin Pop | |
479 | 49148d15 | Iustin Pop | Default output |
480 | 49148d15 | Iustin Pop | ~~~~~~~~~~~~~~ |
481 | 49148d15 | Iustin Pop | |
482 | 49148d15 | Iustin Pop | With the default options, the program shows each individual step and |
483 | 49148d15 | Iustin Pop | the improvements it brings in cluster score:: |
484 | 49148d15 | Iustin Pop | |
485 | 49148d15 | Iustin Pop | $ hbal |
486 | 49148d15 | Iustin Pop | Loaded 20 nodes, 80 instances |
487 | 49148d15 | Iustin Pop | Cluster is not N+1 happy, continuing but no guarantee that the cluster will end N+1 happy. |
488 | 49148d15 | Iustin Pop | Initial score: 0.52329131 |
489 | 49148d15 | Iustin Pop | Trying to minimize the CV... |
490 | 49148d15 | Iustin Pop | 1. instance14 node1:node10 => node16:node10 0.42109120 a=f r:node16 f |
491 | 49148d15 | Iustin Pop | 2. instance54 node4:node15 => node16:node15 0.31904594 a=f r:node16 f |
492 | 49148d15 | Iustin Pop | 3. instance4 node5:node2 => node2:node16 0.26611015 a=f r:node16 |
493 | 49148d15 | Iustin Pop | 4. instance48 node18:node20 => node2:node18 0.21361717 a=r:node2 f |
494 | 49148d15 | Iustin Pop | 5. instance93 node19:node18 => node16:node19 0.16166425 a=r:node16 f |
495 | 49148d15 | Iustin Pop | 6. instance89 node3:node20 => node2:node3 0.11005629 a=r:node2 f |
496 | 49148d15 | Iustin Pop | 7. instance5 node6:node2 => node16:node6 0.05841589 a=r:node16 f |
497 | 49148d15 | Iustin Pop | 8. instance94 node7:node20 => node20:node16 0.00658759 a=f r:node16 |
498 | 49148d15 | Iustin Pop | 9. instance44 node20:node2 => node2:node15 0.00438740 a=f r:node15 |
499 | 49148d15 | Iustin Pop | 10. instance62 node14:node18 => node14:node16 0.00390087 a=r:node16 |
500 | 49148d15 | Iustin Pop | 11. instance13 node11:node14 => node11:node16 0.00361787 a=r:node16 |
501 | 49148d15 | Iustin Pop | 12. instance19 node10:node11 => node10:node7 0.00336636 a=r:node7 |
502 | 49148d15 | Iustin Pop | 13. instance43 node12:node13 => node12:node1 0.00305681 a=r:node1 |
503 | 49148d15 | Iustin Pop | 14. instance1 node1:node2 => node1:node4 0.00263124 a=r:node4 |
504 | 49148d15 | Iustin Pop | 15. instance58 node19:node20 => node19:node17 0.00252594 a=r:node17 |
505 | 49148d15 | Iustin Pop | Cluster score improved from 0.52329131 to 0.00252594 |
506 | 49148d15 | Iustin Pop | |
507 | 49148d15 | Iustin Pop | In the above output, we can see: |
508 | 49148d15 | Iustin Pop | |
509 | 49148d15 | Iustin Pop | - the input data (here from files) shows a cluster with 20 nodes and |
510 | 49148d15 | Iustin Pop | 80 instances |
511 | 49148d15 | Iustin Pop | - the cluster is not initially N+1 compliant |
512 | 49148d15 | Iustin Pop | - the initial score is 0.52329131 |
513 | 49148d15 | Iustin Pop | |
514 | 49148d15 | Iustin Pop | The step list follows, showing the instance, its initial |
515 | 49148d15 | Iustin Pop | primary/secondary nodes, the new primary secondary, the cluster list, |
516 | 49148d15 | Iustin Pop | and the actions taken in this step (with 'f' denoting failover/migrate |
517 | 49148d15 | Iustin Pop | and 'r' denoting replace secondary). |
518 | 49148d15 | Iustin Pop | |
519 | 49148d15 | Iustin Pop | Finally, the program shows the improvement in cluster score. |
520 | 49148d15 | Iustin Pop | |
521 | 49148d15 | Iustin Pop | A more detailed output is obtained via the *-C* and *-p* options:: |
522 | 49148d15 | Iustin Pop | |
523 | 49148d15 | Iustin Pop | $ hbal |
524 | 49148d15 | Iustin Pop | Loaded 20 nodes, 80 instances |
525 | 49148d15 | Iustin Pop | Cluster is not N+1 happy, continuing but no guarantee that the cluster will end N+1 happy. |
526 | 49148d15 | Iustin Pop | Initial cluster status: |
527 | 49148d15 | Iustin Pop | N1 Name t_mem f_mem r_mem t_dsk f_dsk pri sec p_fmem p_fdsk |
528 | 49148d15 | Iustin Pop | * node1 32762 1280 6000 1861 1026 5 3 0.03907 0.55179 |
529 | 49148d15 | Iustin Pop | node2 32762 31280 12000 1861 1026 0 8 0.95476 0.55179 |
530 | 49148d15 | Iustin Pop | * node3 32762 1280 6000 1861 1026 5 3 0.03907 0.55179 |
531 | 49148d15 | Iustin Pop | * node4 32762 1280 6000 1861 1026 5 3 0.03907 0.55179 |
532 | 49148d15 | Iustin Pop | * node5 32762 1280 6000 1861 978 5 5 0.03907 0.52573 |
533 | 49148d15 | Iustin Pop | * node6 32762 1280 6000 1861 1026 5 3 0.03907 0.55179 |
534 | 49148d15 | Iustin Pop | * node7 32762 1280 6000 1861 1026 5 3 0.03907 0.55179 |
535 | 49148d15 | Iustin Pop | node8 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
536 | 49148d15 | Iustin Pop | node9 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
537 | 49148d15 | Iustin Pop | * node10 32762 7280 12000 1861 1026 4 4 0.22221 0.55179 |
538 | 49148d15 | Iustin Pop | node11 32762 7280 6000 1861 922 4 5 0.22221 0.49577 |
539 | 49148d15 | Iustin Pop | node12 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
540 | 49148d15 | Iustin Pop | node13 32762 7280 6000 1861 922 4 5 0.22221 0.49577 |
541 | 49148d15 | Iustin Pop | node14 32762 7280 6000 1861 922 4 5 0.22221 0.49577 |
542 | 49148d15 | Iustin Pop | * node15 32762 7280 12000 1861 1131 4 3 0.22221 0.60782 |
543 | 49148d15 | Iustin Pop | node16 32762 31280 0 1861 1860 0 0 0.95476 1.00000 |
544 | 49148d15 | Iustin Pop | node17 32762 7280 6000 1861 1106 5 3 0.22221 0.59479 |
545 | 49148d15 | Iustin Pop | * node18 32762 1280 6000 1396 561 5 3 0.03907 0.40239 |
546 | 49148d15 | Iustin Pop | * node19 32762 1280 6000 1861 1026 5 3 0.03907 0.55179 |
547 | 49148d15 | Iustin Pop | node20 32762 13280 12000 1861 689 3 9 0.40535 0.37068 |
548 | 49148d15 | Iustin Pop | |
549 | 49148d15 | Iustin Pop | Initial score: 0.52329131 |
550 | 49148d15 | Iustin Pop | Trying to minimize the CV... |
551 | 49148d15 | Iustin Pop | 1. instance14 node1:node10 => node16:node10 0.42109120 a=f r:node16 f |
552 | 49148d15 | Iustin Pop | 2. instance54 node4:node15 => node16:node15 0.31904594 a=f r:node16 f |
553 | 49148d15 | Iustin Pop | 3. instance4 node5:node2 => node2:node16 0.26611015 a=f r:node16 |
554 | 49148d15 | Iustin Pop | 4. instance48 node18:node20 => node2:node18 0.21361717 a=r:node2 f |
555 | 49148d15 | Iustin Pop | 5. instance93 node19:node18 => node16:node19 0.16166425 a=r:node16 f |
556 | 49148d15 | Iustin Pop | 6. instance89 node3:node20 => node2:node3 0.11005629 a=r:node2 f |
557 | 49148d15 | Iustin Pop | 7. instance5 node6:node2 => node16:node6 0.05841589 a=r:node16 f |
558 | 49148d15 | Iustin Pop | 8. instance94 node7:node20 => node20:node16 0.00658759 a=f r:node16 |
559 | 49148d15 | Iustin Pop | 9. instance44 node20:node2 => node2:node15 0.00438740 a=f r:node15 |
560 | 49148d15 | Iustin Pop | 10. instance62 node14:node18 => node14:node16 0.00390087 a=r:node16 |
561 | 49148d15 | Iustin Pop | 11. instance13 node11:node14 => node11:node16 0.00361787 a=r:node16 |
562 | 49148d15 | Iustin Pop | 12. instance19 node10:node11 => node10:node7 0.00336636 a=r:node7 |
563 | 49148d15 | Iustin Pop | 13. instance43 node12:node13 => node12:node1 0.00305681 a=r:node1 |
564 | 49148d15 | Iustin Pop | 14. instance1 node1:node2 => node1:node4 0.00263124 a=r:node4 |
565 | 49148d15 | Iustin Pop | 15. instance58 node19:node20 => node19:node17 0.00252594 a=r:node17 |
566 | 49148d15 | Iustin Pop | Cluster score improved from 0.52329131 to 0.00252594 |
567 | 49148d15 | Iustin Pop | |
568 | 49148d15 | Iustin Pop | Commands to run to reach the above solution: |
569 | 49148d15 | Iustin Pop | echo step 1 |
570 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance14 |
571 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node16 instance14 |
572 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance14 |
573 | 49148d15 | Iustin Pop | echo step 2 |
574 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance54 |
575 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node16 instance54 |
576 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance54 |
577 | 49148d15 | Iustin Pop | echo step 3 |
578 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance4 |
579 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node16 instance4 |
580 | 49148d15 | Iustin Pop | echo step 4 |
581 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node2 instance48 |
582 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance48 |
583 | 49148d15 | Iustin Pop | echo step 5 |
584 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node16 instance93 |
585 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance93 |
586 | 49148d15 | Iustin Pop | echo step 6 |
587 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node2 instance89 |
588 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance89 |
589 | 49148d15 | Iustin Pop | echo step 7 |
590 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node16 instance5 |
591 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance5 |
592 | 49148d15 | Iustin Pop | echo step 8 |
593 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance94 |
594 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node16 instance94 |
595 | 49148d15 | Iustin Pop | echo step 9 |
596 | 49148d15 | Iustin Pop | echo gnt-instance migrate instance44 |
597 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node15 instance44 |
598 | 49148d15 | Iustin Pop | echo step 10 |
599 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node16 instance62 |
600 | 49148d15 | Iustin Pop | echo step 11 |
601 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node16 instance13 |
602 | 49148d15 | Iustin Pop | echo step 12 |
603 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node7 instance19 |
604 | 49148d15 | Iustin Pop | echo step 13 |
605 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node1 instance43 |
606 | 49148d15 | Iustin Pop | echo step 14 |
607 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node4 instance1 |
608 | 49148d15 | Iustin Pop | echo step 15 |
609 | 49148d15 | Iustin Pop | echo gnt-instance replace-disks -n node17 instance58 |
610 | 49148d15 | Iustin Pop | |
611 | 49148d15 | Iustin Pop | Final cluster status: |
612 | 49148d15 | Iustin Pop | N1 Name t_mem f_mem r_mem t_dsk f_dsk pri sec p_fmem p_fdsk |
613 | 49148d15 | Iustin Pop | node1 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
614 | 49148d15 | Iustin Pop | node2 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
615 | 49148d15 | Iustin Pop | node3 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
616 | 49148d15 | Iustin Pop | node4 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
617 | 49148d15 | Iustin Pop | node5 32762 7280 6000 1861 1078 4 5 0.22221 0.57947 |
618 | 49148d15 | Iustin Pop | node6 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
619 | 49148d15 | Iustin Pop | node7 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
620 | 49148d15 | Iustin Pop | node8 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
621 | 49148d15 | Iustin Pop | node9 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
622 | 49148d15 | Iustin Pop | node10 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
623 | 49148d15 | Iustin Pop | node11 32762 7280 6000 1861 1022 4 4 0.22221 0.54951 |
624 | 49148d15 | Iustin Pop | node12 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
625 | 49148d15 | Iustin Pop | node13 32762 7280 6000 1861 1022 4 4 0.22221 0.54951 |
626 | 49148d15 | Iustin Pop | node14 32762 7280 6000 1861 1022 4 4 0.22221 0.54951 |
627 | 49148d15 | Iustin Pop | node15 32762 7280 6000 1861 1031 4 4 0.22221 0.55408 |
628 | 49148d15 | Iustin Pop | node16 32762 7280 6000 1861 1060 4 4 0.22221 0.57007 |
629 | 49148d15 | Iustin Pop | node17 32762 7280 6000 1861 1006 5 4 0.22221 0.54105 |
630 | 49148d15 | Iustin Pop | node18 32762 7280 6000 1396 761 4 2 0.22221 0.54570 |
631 | 49148d15 | Iustin Pop | node19 32762 7280 6000 1861 1026 4 4 0.22221 0.55179 |
632 | 49148d15 | Iustin Pop | node20 32762 13280 6000 1861 1089 3 5 0.40535 0.58565 |
633 | 49148d15 | Iustin Pop | |
634 | 49148d15 | Iustin Pop | Here we see, beside the step list, the initial and final cluster |
635 | 49148d15 | Iustin Pop | status, with the final one showing all nodes being N+1 compliant, and |
636 | 49148d15 | Iustin Pop | the command list to reach the final solution. In the initial listing, |
637 | 49148d15 | Iustin Pop | we see which nodes are not N+1 compliant. |
638 | 49148d15 | Iustin Pop | |
639 | 49148d15 | Iustin Pop | The algorithm is stable as long as each step above is fully completed, |
640 | 49148d15 | Iustin Pop | e.g. in step 8, both the migrate and the replace-disks are |
641 | 49148d15 | Iustin Pop | done. Otherwise, if only the migrate is done, the input data is |
642 | 49148d15 | Iustin Pop | changed in a way that the program will output a different solution |
643 | 49148d15 | Iustin Pop | list (but hopefully will end in the same state). |
644 | 9ff4f2c0 | Michael Hanselmann | |
645 | 9ff4f2c0 | Michael Hanselmann | .. vim: set textwidth=72 : |
646 | 9ff4f2c0 | Michael Hanselmann | .. Local Variables: |
647 | 9ff4f2c0 | Michael Hanselmann | .. mode: rst |
648 | 9ff4f2c0 | Michael Hanselmann | .. fill-column: 72 |
649 | 9ff4f2c0 | Michael Hanselmann | .. End: |