root / man / gnt-cluster.rst @ d5b031dc
History | View | Annotate | Download (30.7 kB)
1 |
gnt-cluster(8) Ganeti | Version @GANETI_VERSION@ |
---|---|
2 |
================================================ |
3 |
|
4 |
Name |
5 |
---- |
6 |
|
7 |
gnt-cluster - Ganeti administration, cluster-wide |
8 |
|
9 |
Synopsis |
10 |
-------- |
11 |
|
12 |
**gnt-cluster** {command} [arguments...] |
13 |
|
14 |
DESCRIPTION |
15 |
----------- |
16 |
|
17 |
The **gnt-cluster** is used for cluster-wide administration in the |
18 |
Ganeti system. |
19 |
|
20 |
COMMANDS |
21 |
-------- |
22 |
|
23 |
ACTIVATE-MASTER-IP |
24 |
~~~~~~~~~~~~~~~~~~ |
25 |
|
26 |
**activate-master-ip** |
27 |
|
28 |
Activates the master IP on the master node. |
29 |
|
30 |
ADD-TAGS |
31 |
~~~~~~~~ |
32 |
|
33 |
**add-tags** [\--from *file*] {*tag*...} |
34 |
|
35 |
Add tags to the cluster. If any of the tags contains invalid |
36 |
characters, the entire operation will abort. |
37 |
|
38 |
If the ``--from`` option is given, the list of tags will be |
39 |
extended with the contents of that file (each line becomes a tag). |
40 |
In this case, there is not need to pass tags on the command line |
41 |
(if you do, both sources will be used). A file name of - will be |
42 |
interpreted as stdin. |
43 |
|
44 |
COMMAND |
45 |
~~~~~~~ |
46 |
|
47 |
**command** [-n *node*] [-g *group*] [-M] {*command*} |
48 |
|
49 |
Executes a command on all nodes. If the option ``-n`` is not given, |
50 |
the command will be executed on all nodes, otherwise it will be |
51 |
executed only on the node(s) specified. Use the option multiple |
52 |
times for running it on multiple nodes, like:: |
53 |
|
54 |
# gnt-cluster command -n node1.example.com -n node2.example.com date |
55 |
|
56 |
The ``-g`` option can be used to run a command only on a specific node |
57 |
group, e.g.:: |
58 |
|
59 |
# gnt-cluster command -g default date |
60 |
|
61 |
The ``-M`` option can be used to prepend the node name to all output |
62 |
lines. The ``--failure-only`` option hides successful commands, making |
63 |
it easier to see failures. |
64 |
|
65 |
The command is executed serially on the selected nodes. If the |
66 |
master node is present in the list, the command will be executed |
67 |
last on the master. Regarding the other nodes, the execution order |
68 |
is somewhat alphabetic, so that node2.example.com will be earlier |
69 |
than node10.example.com but after node1.example.com. |
70 |
|
71 |
So given the node names node1, node2, node3, node10, node11, with |
72 |
node3 being the master, the order will be: node1, node2, node10, |
73 |
node11, node3. |
74 |
|
75 |
The command is constructed by concatenating all other command line |
76 |
arguments. For example, to list the contents of the /etc directory |
77 |
on all nodes, run:: |
78 |
|
79 |
# gnt-cluster command ls -l /etc |
80 |
|
81 |
and the command which will be executed will be ``ls -l /etc``. |
82 |
|
83 |
COPYFILE |
84 |
~~~~~~~~ |
85 |
|
86 |
| **copyfile** [\--use-replication-network] [-n *node*] [-g *group*] |
87 |
| {*file*} |
88 |
|
89 |
Copies a file to all or to some nodes. The argument specifies the |
90 |
source file (on the current system), the ``-n`` argument specifies |
91 |
the target node, or nodes if the option is given multiple times. If |
92 |
``-n`` is not given at all, the file will be copied to all nodes. The |
93 |
``-g`` option can be used to only select nodes in a specific node group. |
94 |
Passing the ``--use-replication-network`` option will cause the |
95 |
copy to be done over the replication network (only matters if the |
96 |
primary/secondary IPs are different). Example:: |
97 |
|
98 |
# gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test |
99 |
|
100 |
This will copy the file /tmp/test from the current node to the two |
101 |
named nodes. |
102 |
|
103 |
DEACTIVATE-MASTER-IP |
104 |
~~~~~~~~~~~~~~~~~~~~ |
105 |
|
106 |
**deactivate-master-ip** [\--yes] |
107 |
|
108 |
Deactivates the master IP on the master node. |
109 |
|
110 |
This should be run only locally or on a connection to the node ip |
111 |
directly, as a connection to the master ip will be broken by this |
112 |
operation. Because of this risk it will require user confirmation |
113 |
unless the ``--yes`` option is passed. |
114 |
|
115 |
DESTROY |
116 |
~~~~~~~ |
117 |
|
118 |
**destroy** {\--yes-do-it} |
119 |
|
120 |
Remove all configuration files related to the cluster, so that a |
121 |
**gnt-cluster init** can be done again afterwards. |
122 |
|
123 |
Since this is a dangerous command, you are required to pass the |
124 |
argument *\--yes-do-it.* |
125 |
|
126 |
EPO |
127 |
~~~ |
128 |
|
129 |
**epo** [\--on] [\--groups|\--all] [\--power-delay] *arguments* |
130 |
|
131 |
Performs an emergency power-off on nodes given as arguments. If |
132 |
``--groups`` is given, arguments are node groups. If ``--all`` is |
133 |
provided, the whole cluster will be shut down. |
134 |
|
135 |
The ``--on`` flag recovers the cluster after an emergency power-off. |
136 |
When powering on the cluster you can use ``--power-delay`` to define the |
137 |
time in seconds (fractions allowed) waited between powering on |
138 |
individual nodes. |
139 |
|
140 |
Please note that the master node will not be turned down or up |
141 |
automatically. It will just be left in a state, where you can manully |
142 |
perform the shutdown of that one node. If the master is in the list of |
143 |
affected nodes and this is not a complete cluster emergency power-off |
144 |
(e.g. using ``--all``), you're required to do a master failover to |
145 |
another node not affected. |
146 |
|
147 |
GETMASTER |
148 |
~~~~~~~~~ |
149 |
|
150 |
**getmaster** |
151 |
|
152 |
Displays the current master node. |
153 |
|
154 |
INFO |
155 |
~~~~ |
156 |
|
157 |
**info** [\--roman] |
158 |
|
159 |
Shows runtime cluster information: cluster name, architecture (32 |
160 |
or 64 bit), master node, node list and instance list. |
161 |
|
162 |
Passing the ``--roman`` option gnt-cluster info will try to print |
163 |
its integer fields in a latin friendly way. This allows further |
164 |
diffusion of Ganeti among ancient cultures. |
165 |
|
166 |
INIT |
167 |
~~~~ |
168 |
|
169 |
| **init** |
170 |
| [{-s|\--secondary-ip} *secondary\_ip*] |
171 |
| [\--vg-name *vg-name*] |
172 |
| [\--master-netdev *interface-name*] |
173 |
| [\--master-netmask *netmask*] |
174 |
| [\--use-external-mip-script {yes \| no}] |
175 |
| [{-m|\--mac-prefix} *mac-prefix*] |
176 |
| [\--no-lvm-storage] |
177 |
| [\--no-etc-hosts] |
178 |
| [\--no-ssh-init] |
179 |
| [\--file-storage-dir *dir*] |
180 |
| [\--enabled-hypervisors *hypervisors*] |
181 |
| [{-H|\--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]] |
182 |
| [{-B|\--backend-parameters} *be-param*=*value*[,*be-param*=*value*...]] |
183 |
| [{-N|\--nic-parameters} *nic-param*=*value*[,*nic-param*=*value*...]] |
184 |
| [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]] |
185 |
| [\--maintain-node-health {yes \| no}] |
186 |
| [\--uid-pool *user-id pool definition*] |
187 |
| [{-I|\--default-iallocator} *default instance allocator*] |
188 |
| [\--primary-ip-version *version*] |
189 |
| [\--prealloc-wipe-disks {yes \| no}] |
190 |
| [\--node-parameters *ndparams*] |
191 |
| [{-C|\--candidate-pool-size} *candidate\_pool\_size*] |
192 |
| [\--specs-cpu-count *spec-param*=*value* [,*spec-param*=*value*...]] |
193 |
| [\--specs-disk-count *spec-param*=*value* [,*spec-param*=*value*...]] |
194 |
| [\--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]] |
195 |
| [\--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]] |
196 |
| [\--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]] |
197 |
| [\--ipol-disk-templates *template* [,*template*...]] |
198 |
| [\--disk-state *diskstate*] |
199 |
| [\--hypervisor-state *hvstate*] |
200 |
| {*clustername*} |
201 |
|
202 |
This commands is only run once initially on the first node of the |
203 |
cluster. It will initialize the cluster configuration, setup the |
204 |
ssh-keys, start the daemons on the master node, etc. in order to have |
205 |
a working one-node cluster. |
206 |
|
207 |
Note that the *clustername* is not any random name. It has to be |
208 |
resolvable to an IP address using DNS, and it is best if you give the |
209 |
fully-qualified domain name. This hostname must resolve to an IP |
210 |
address reserved exclusively for this purpose, i.e. not already in |
211 |
use. |
212 |
|
213 |
The cluster can run in two modes: single-home or dual-homed. In the |
214 |
first case, all traffic (both public traffic, inter-node traffic and |
215 |
data replication traffic) goes over the same interface. In the |
216 |
dual-homed case, the data replication traffic goes over the second |
217 |
network. The ``-s (--secondary-ip)`` option here marks the cluster as |
218 |
dual-homed and its parameter represents this node's address on the |
219 |
second network. If you initialise the cluster with ``-s``, all nodes |
220 |
added must have a secondary IP as well. |
221 |
|
222 |
Note that for Ganeti it doesn't matter if the secondary network is |
223 |
actually a separate physical network, or is done using tunneling, |
224 |
etc. For performance reasons, it's recommended to use a separate |
225 |
network, of course. |
226 |
|
227 |
The ``--vg-name`` option will let you specify a volume group |
228 |
different than "xenvg" for Ganeti to use when creating instance |
229 |
disks. This volume group must have the same name on all nodes. Once |
230 |
the cluster is initialized this can be altered by using the |
231 |
**modify** command. If you don't want to use lvm storage at all use |
232 |
the ``--no-lvm-storage`` option. Once the cluster is initialized |
233 |
you can change this setup with the **modify** command. |
234 |
|
235 |
The ``--master-netdev`` option is useful for specifying a different |
236 |
interface on which the master will activate its IP address. It's |
237 |
important that all nodes have this interface because you'll need it |
238 |
for a master failover. |
239 |
|
240 |
The ``--master-netmask`` option allows to specify a netmask for the |
241 |
master IP. The netmask must be specified as an integer, and will be |
242 |
interpreted as a CIDR netmask. The default value is 32 for an IPv4 |
243 |
address and 128 for an IPv6 address. |
244 |
|
245 |
The ``--use-external-mip-script`` option allows to specify whether to |
246 |
use an user-supplied master IP address setup script, whose location is |
247 |
``@SYSCONFDIR@/ganeti/scripts/master-ip-setup``. If the option value is |
248 |
set to False, the default script (located at |
249 |
``@PKGLIBDIR@/tools/master-ip-setup``) will be executed. |
250 |
|
251 |
The ``-m (--mac-prefix)`` option will let you specify a three byte |
252 |
prefix under which the virtual MAC addresses of your instances will be |
253 |
generated. The prefix must be specified in the format ``XX:XX:XX`` and |
254 |
the default is ``aa:00:00``. |
255 |
|
256 |
The ``--no-lvm-storage`` option allows you to initialize the |
257 |
cluster without lvm support. This means that only instances using |
258 |
files as storage backend will be possible to create. Once the |
259 |
cluster is initialized you can change this setup with the |
260 |
**modify** command. |
261 |
|
262 |
The ``--no-etc-hosts`` option allows you to initialize the cluster |
263 |
without modifying the /etc/hosts file. |
264 |
|
265 |
The ``--no-ssh-init`` option allows you to initialize the cluster |
266 |
without creating or distributing SSH key pairs. |
267 |
|
268 |
The ``--file-storage-dir`` option allows you set the directory to |
269 |
use for storing the instance disk files when using file storage as |
270 |
backend for instance disks. |
271 |
|
272 |
The ``--prealloc-wipe-disks`` sets a cluster wide configuration value |
273 |
for wiping disks prior to allocation and size changes (``gnt-instance |
274 |
grow-disk``). This increases security on instance level as the instance |
275 |
can't access untouched data from its underlying storage. |
276 |
|
277 |
The ``--enabled-hypervisors`` option allows you to set the list of |
278 |
hypervisors that will be enabled for this cluster. Instance |
279 |
hypervisors can only be chosen from the list of enabled |
280 |
hypervisors, and the first entry of this list will be used by |
281 |
default. Currently, the following hypervisors are available: |
282 |
|
283 |
xen-pvm |
284 |
Xen PVM hypervisor |
285 |
|
286 |
xen-hvm |
287 |
Xen HVM hypervisor |
288 |
|
289 |
kvm |
290 |
Linux KVM hypervisor |
291 |
|
292 |
chroot |
293 |
a simple chroot manager that starts chroot based on a script at the |
294 |
root of the filesystem holding the chroot |
295 |
|
296 |
fake |
297 |
fake hypervisor for development/testing |
298 |
|
299 |
Either a single hypervisor name or a comma-separated list of |
300 |
hypervisor names can be specified. If this option is not specified, |
301 |
only the xen-pvm hypervisor is enabled by default. |
302 |
|
303 |
The ``-H (--hypervisor-parameters)`` option allows you to set default |
304 |
hypervisor specific parameters for the cluster. The format of this |
305 |
option is the name of the hypervisor, followed by a colon and a |
306 |
comma-separated list of key=value pairs. The keys available for each |
307 |
hypervisors are detailed in the gnt-instance(8) man page, in the |
308 |
**add** command plus the following parameters which are only |
309 |
configurable globally (at cluster level): |
310 |
|
311 |
migration\_port |
312 |
Valid for the Xen PVM and KVM hypervisors. |
313 |
|
314 |
This options specifies the TCP port to use for live-migration. For |
315 |
Xen, the same port should be configured on all nodes in the |
316 |
``/etc/xen/xend-config.sxp`` file, under the key |
317 |
"xend-relocation-port". |
318 |
|
319 |
migration\_bandwidth |
320 |
Valid for the KVM hypervisor. |
321 |
|
322 |
This option specifies the maximum bandwidth that KVM will use for |
323 |
instance live migrations. The value is in MiB/s. |
324 |
|
325 |
This option is only effective with kvm versions >= 78 and qemu-kvm |
326 |
versions >= 0.10.0. |
327 |
|
328 |
The ``-B (--backend-parameters)`` option allows you to set the default |
329 |
backend parameters for the cluster. The parameter format is a |
330 |
comma-separated list of key=value pairs with the following supported |
331 |
keys: |
332 |
|
333 |
vcpus |
334 |
Number of VCPUs to set for an instance by default, must be an |
335 |
integer, will be set to 1 if no specified. |
336 |
|
337 |
maxmem |
338 |
Maximum amount of memory to allocate for an instance by default, can |
339 |
be either an integer or an integer followed by a unit (M for |
340 |
mebibytes and G for gibibytes are supported), will be set to 128M if |
341 |
not specified. |
342 |
|
343 |
minmem |
344 |
Minimum amount of memory to allocate for an instance by default, can |
345 |
be either an integer or an integer followed by a unit (M for |
346 |
mebibytes and G for gibibytes are supported), will be set to 128M if |
347 |
not specified. |
348 |
|
349 |
auto\_balance |
350 |
Value of the auto\_balance flag for instances to use by default, |
351 |
will be set to true if not specified. |
352 |
|
353 |
always\_failover |
354 |
Default value for the ``always\_failover`` flag for instances; if |
355 |
not set, ``False`` is used. |
356 |
|
357 |
|
358 |
The ``-N (--nic-parameters)`` option allows you to set the default nic |
359 |
parameters for the cluster. The parameter format is a comma-separated |
360 |
list of key=value pairs with the following supported keys: |
361 |
|
362 |
mode |
363 |
The default nic mode, 'routed' or 'bridged'. |
364 |
|
365 |
link |
366 |
In bridged mode the default NIC bridge. In routed mode it |
367 |
represents an hypervisor-vif-script dependent value to allow |
368 |
different instance groups. For example under the KVM default |
369 |
network script it is interpreted as a routing table number or |
370 |
name. |
371 |
|
372 |
The ``-D (--disk-parameters)`` option allows you to set the default disk |
373 |
template parameters at cluster level. The format used for this option is |
374 |
similar to the one use by the ``-H`` option: the disk template name |
375 |
must be specified first, followed by a colon and by a comma-separated |
376 |
list of key-value pairs. These parameters can only be specified at |
377 |
cluster and node group level; the cluster-level parameter are inherited |
378 |
by the node group at the moment of its creation, and can be further |
379 |
modified at node group level using the **gnt-group**(8) command. |
380 |
|
381 |
The following is the list of disk parameters available for the **drbd** |
382 |
template, with measurement units specified in square brackets at the end |
383 |
of the description (when applicable): |
384 |
|
385 |
resync-rate |
386 |
Static re-synchronization rate. [KiB/s] |
387 |
|
388 |
data-stripes |
389 |
Number of stripes to use for data LVs. |
390 |
|
391 |
meta-stripes |
392 |
Number of stripes to use for meta LVs. |
393 |
|
394 |
disk-barriers |
395 |
What kind of barriers to **disable** for disks. It can either assume |
396 |
the value "n", meaning no barrier disabled, or a non-empty string |
397 |
containing a subset of the characters "bfd". "b" means disable disk |
398 |
barriers, "f" means disable disk flushes, "d" disables disk drains. |
399 |
|
400 |
meta-barriers |
401 |
Boolean value indicating whether the meta barriers should be |
402 |
disabled (True) or not (False). |
403 |
|
404 |
metavg |
405 |
String containing the name of the default LVM volume group for DRBD |
406 |
metadata. By default, it is set to ``xenvg``. It can be overridden |
407 |
during the instance creation process by using the ``metavg`` key of |
408 |
the ``--disk`` parameter. |
409 |
|
410 |
disk-custom |
411 |
String containing additional parameters to be appended to the |
412 |
arguments list of ``drbdsetup disk``. |
413 |
|
414 |
net-custom |
415 |
String containing additional parameters to be appended to the |
416 |
arguments list of ``drbdsetup net``. |
417 |
|
418 |
dynamic-resync |
419 |
Boolean indicating whether to use the dynamic resync speed |
420 |
controller or not. If enabled, c-plan-ahead must be non-zero and all |
421 |
the c-* parameters will be used by DRBD. Otherwise, the value of |
422 |
resync-rate will be used as a static resync speed. |
423 |
|
424 |
c-plan-ahead |
425 |
Agility factor of the dynamic resync speed controller. (the higher, |
426 |
the slower the algorithm will adapt the resync speed). A value of 0 |
427 |
(that is the default) disables the controller. [ds] |
428 |
|
429 |
c-fill-target |
430 |
Maximum amount of in-flight resync data for the dynamic resync speed |
431 |
controller. [sectors] |
432 |
|
433 |
c-delay-target |
434 |
Maximum estimated peer response latency for the dynamic resync speed |
435 |
controller. [ds] |
436 |
|
437 |
c-min-rate |
438 |
Minimum resync speed for the dynamic resync speed controller. [KiB/s] |
439 |
|
440 |
c-max-rate |
441 |
Upper bound on resync speed for the dynamic resync speed controller. |
442 |
[KiB/s] |
443 |
|
444 |
List of parameters available for the **plain** template: |
445 |
|
446 |
stripes |
447 |
Number of stripes to use for new LVs. |
448 |
|
449 |
List of parameters available for the **rbd** template: |
450 |
|
451 |
pool |
452 |
The RADOS cluster pool, inside which all rbd volumes will reside. |
453 |
When a new RADOS cluster is deployed, the default pool to put rbd |
454 |
volumes (Images in RADOS terminology) is 'rbd'. |
455 |
|
456 |
The option ``--maintain-node-health`` allows one to enable/disable |
457 |
automatic maintenance actions on nodes. Currently these include |
458 |
automatic shutdown of instances and deactivation of DRBD devices on |
459 |
offline nodes; in the future it might be extended to automatic |
460 |
removal of unknown LVM volumes, etc. Note that this option is only |
461 |
useful if the use of ``ganeti-confd`` was enabled at compilation. |
462 |
|
463 |
The ``--uid-pool`` option initializes the user-id pool. The |
464 |
*user-id pool definition* can contain a list of user-ids and/or a |
465 |
list of user-id ranges. The parameter format is a comma-separated |
466 |
list of numeric user-ids or user-id ranges. The ranges are defined |
467 |
by a lower and higher boundary, separated by a dash. The boundaries |
468 |
are inclusive. If the ``--uid-pool`` option is not supplied, the |
469 |
user-id pool is initialized to an empty list. An empty list means |
470 |
that the user-id pool feature is disabled. |
471 |
|
472 |
The ``-I (--default-iallocator)`` option specifies the default |
473 |
instance allocator. The instance allocator will be used for operations |
474 |
like instance creation, instance and node migration, etc. when no |
475 |
manual override is specified. If this option is not specified and |
476 |
htools was not enabled at build time, the default instance allocator |
477 |
will be blank, which means that relevant operations will require the |
478 |
administrator to manually specify either an instance allocator, or a |
479 |
set of nodes. If the option is not specified but htools was enabled, |
480 |
the default iallocator will be **hail**(1) (assuming it can be found |
481 |
on disk). The default iallocator can be changed later using the |
482 |
**modify** command. |
483 |
|
484 |
The ``--primary-ip-version`` option specifies the IP version used |
485 |
for the primary address. Possible values are 4 and 6 for IPv4 and |
486 |
IPv6, respectively. This option is used when resolving node names |
487 |
and the cluster name. |
488 |
|
489 |
The ``--node-parameters`` option allows you to set default node |
490 |
parameters for the cluster. Please see **ganeti**(7) for more |
491 |
information about supported key=value pairs. |
492 |
|
493 |
The ``-C (--candidate-pool-size)`` option specifies the |
494 |
``candidate_pool_size`` cluster parameter. This is the number of nodes |
495 |
that the master will try to keep as master\_candidates. For more |
496 |
details about this role and other node roles, see the ganeti(7). |
497 |
|
498 |
The ``--specs-...`` and ``--ipol-disk-templates`` options specify |
499 |
instance policy on the cluster. For the ``--specs-...`` options, each |
500 |
option can have three values: ``min``, ``max`` and ``std``, which can |
501 |
also be modified on group level (except for ``std``, which is defined |
502 |
once for the entire cluster). Please note, that ``std`` values are not |
503 |
the same as defaults set by ``--beparams``, but they are used for the |
504 |
capacity calculations. The ``--ipol-disk-templates`` option takes a |
505 |
comma-separated list of disk templates. |
506 |
|
507 |
- ``--specs-cpu-count`` limits the number of VCPUs that can be used by an |
508 |
instance. |
509 |
- ``--specs-disk-count`` limits the number of disks |
510 |
- ``--specs-disk-size`` limits the disk size for every disk used |
511 |
- ``--specs-mem-size`` limits the amount of memory available |
512 |
- ``--specs-nic-count`` sets limits on the number of NICs used |
513 |
- ``--ipol-disk-templates`` limits the allowed disk templates |
514 |
|
515 |
For details about how to use ``--hypervisor-state`` and ``--disk-state`` |
516 |
have a look at **ganeti**(7). |
517 |
|
518 |
LIST-TAGS |
519 |
~~~~~~~~~ |
520 |
|
521 |
**list-tags** |
522 |
|
523 |
List the tags of the cluster. |
524 |
|
525 |
MASTER-FAILOVER |
526 |
~~~~~~~~~~~~~~~ |
527 |
|
528 |
**master-failover** [\--no-voting] [\--yes-do-it] |
529 |
|
530 |
Failover the master role to the current node. |
531 |
|
532 |
The ``--no-voting`` option skips the remote node agreement checks. |
533 |
This is dangerous, but necessary in some cases (for example failing |
534 |
over the master role in a 2 node cluster with the original master |
535 |
down). If the original master then comes up, it won't be able to |
536 |
start its master daemon because it won't have enough votes, but so |
537 |
won't the new master, if the master daemon ever needs a restart. |
538 |
You can pass ``--no-voting`` to **ganeti-masterd** on the new |
539 |
master to solve this problem, and run **gnt-cluster redist-conf** |
540 |
to make sure the cluster is consistent again. |
541 |
|
542 |
The option ``--yes-do-it`` is used together with ``--no-voting``, for |
543 |
skipping the interactive checks. This is even more dangerous, and should |
544 |
only be used in conjunction with other means (e.g. a HA suite) to |
545 |
confirm that the operation is indeed safe. |
546 |
|
547 |
MASTER-PING |
548 |
~~~~~~~~~~~ |
549 |
|
550 |
**master-ping** |
551 |
|
552 |
Checks if the master daemon is alive. |
553 |
|
554 |
If the master daemon is alive and can respond to a basic query (the |
555 |
equivalent of **gnt-cluster info**), then the exit code of the |
556 |
command will be 0. If the master daemon is not alive (either due to |
557 |
a crash or because this is not the master node), the exit code will |
558 |
be 1. |
559 |
|
560 |
MODIFY |
561 |
~~~~~~ |
562 |
|
563 |
| **modify** [\--submit] |
564 |
| [\--vg-name *vg-name*] |
565 |
| [\--no-lvm-storage] |
566 |
| [\--enabled-hypervisors *hypervisors*] |
567 |
| [{-H|\--hypervisor-parameters} *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]] |
568 |
| [{-B|\--backend-parameters} *be-param*=*value*[,*be-param*=*value*...]] |
569 |
| [{-N|\--nic-parameters} *nic-param*=*value*[,*nic-param*=*value*...]] |
570 |
| [{-D|\--disk-parameters} *disk-template*:*disk-param*=*value*[,*disk-param*=*value*...]] |
571 |
| [\--uid-pool *user-id pool definition*] |
572 |
| [\--add-uids *user-id pool definition*] |
573 |
| [\--remove-uids *user-id pool definition*] |
574 |
| [{-C|\--candidate-pool-size} *candidate\_pool\_size*] |
575 |
| [\--maintain-node-health {yes \| no}] |
576 |
| [\--prealloc-wipe-disks {yes \| no}] |
577 |
| [{-I|\--default-iallocator} *default instance allocator*] |
578 |
| [\--reserved-lvs=*NAMES*] |
579 |
| [\--node-parameters *ndparams*] |
580 |
| [\--master-netdev *interface-name*] |
581 |
| [\--master-netmask *netmask*] |
582 |
| [\--use-external-mip-script {yes \| no}] |
583 |
| [\--hypervisor-state *hvstate*] |
584 |
| [\--disk-state *diskstate*] |
585 |
| [\--specs-cpu-count *spec-param*=*value* [,*spec-param*=*value*...]] |
586 |
| [\--specs-disk-count *spec-param*=*value* [,*spec-param*=*value*...]] |
587 |
| [\--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]] |
588 |
| [\--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]] |
589 |
| [\--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]] |
590 |
| [\--ipol-disk-templates *template* [,*template*...]] |
591 |
|
592 |
|
593 |
Modify the options for the cluster. |
594 |
|
595 |
The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``, |
596 |
``-H (--hypervisor-parameters)``, ``-B (--backend-parameters)``, |
597 |
``-D (--disk-parameters)``, ``--nic-parameters``, ``-C |
598 |
(--candidate-pool-size)``, ``--maintain-node-health``, |
599 |
``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters``, |
600 |
``--master-netdev``, ``--master-netmask`` and |
601 |
``--use-external-mip-script`` options are described in the **init** |
602 |
command. |
603 |
|
604 |
The ``--hypervisor-state`` and ``--disk-state`` options are described in |
605 |
detail in **ganeti(7)**. |
606 |
|
607 |
The ``--add-uids`` and ``--remove-uids`` options can be used to |
608 |
modify the user-id pool by adding/removing a list of user-ids or |
609 |
user-id ranges. |
610 |
|
611 |
The option ``--reserved-lvs`` specifies a list (comma-separated) of |
612 |
logical volume group names (regular expressions) that will be |
613 |
ignored by the cluster verify operation. This is useful if the |
614 |
volume group used for Ganeti is shared with the system for other |
615 |
uses. Note that it's not recommended to create and mark as ignored |
616 |
logical volume names which match Ganeti's own name format (starting |
617 |
with UUID and then .diskN), as this option only skips the |
618 |
verification, but not the actual use of the names given. |
619 |
|
620 |
To remove all reserved logical volumes, pass in an empty argument |
621 |
to the option, as in ``--reserved-lvs=`` or ``--reserved-lvs ''``. |
622 |
|
623 |
The ``-I (--default-iallocator)`` is described in the **init** |
624 |
command. To clear the default iallocator, just pass an empty string |
625 |
(''). |
626 |
|
627 |
The ``--specs-...`` and ``--ipol-disk-templates`` options are described |
628 |
in the **init** command. |
629 |
|
630 |
See **ganeti(7)** for a description of ``--submit`` and other common |
631 |
options. |
632 |
|
633 |
QUEUE |
634 |
~~~~~ |
635 |
|
636 |
**queue** {drain | undrain | info} |
637 |
|
638 |
Change job queue properties. |
639 |
|
640 |
The ``drain`` option sets the drain flag on the job queue. No new |
641 |
jobs will be accepted, but jobs already in the queue will be |
642 |
processed. |
643 |
|
644 |
The ``undrain`` will unset the drain flag on the job queue. New |
645 |
jobs will be accepted. |
646 |
|
647 |
The ``info`` option shows the properties of the job queue. |
648 |
|
649 |
WATCHER |
650 |
~~~~~~~ |
651 |
|
652 |
**watcher** {pause *duration* | continue | info} |
653 |
|
654 |
Make the watcher pause or let it continue. |
655 |
|
656 |
The ``pause`` option causes the watcher to pause for *duration* |
657 |
seconds. |
658 |
|
659 |
The ``continue`` option will let the watcher continue. |
660 |
|
661 |
The ``info`` option shows whether the watcher is currently paused. |
662 |
|
663 |
REDIST-CONF |
664 |
~~~~~~~~~~~ |
665 |
|
666 |
**redist-conf** [\--submit] |
667 |
|
668 |
This command forces a full push of configuration files from the |
669 |
master node to the other nodes in the cluster. This is normally not |
670 |
needed, but can be run if the **verify** complains about |
671 |
configuration mismatches. |
672 |
|
673 |
See **ganeti(7)** for a description of ``--submit`` and other common |
674 |
options. |
675 |
|
676 |
REMOVE-TAGS |
677 |
~~~~~~~~~~~ |
678 |
|
679 |
**remove-tags** [\--from *file*] {*tag*...} |
680 |
|
681 |
Remove tags from the cluster. If any of the tags are not existing |
682 |
on the cluster, the entire operation will abort. |
683 |
|
684 |
If the ``--from`` option is given, the list of tags to be removed will |
685 |
be extended with the contents of that file (each line becomes a tag). |
686 |
In this case, there is not need to pass tags on the command line (if |
687 |
you do, tags from both sources will be removed). A file name of - will |
688 |
be interpreted as stdin. |
689 |
|
690 |
RENAME |
691 |
~~~~~~ |
692 |
|
693 |
**rename** [-f] {*name*} |
694 |
|
695 |
Renames the cluster and in the process updates the master IP |
696 |
address to the one the new name resolves to. At least one of either |
697 |
the name or the IP address must be different, otherwise the |
698 |
operation will be aborted. |
699 |
|
700 |
Note that since this command can be dangerous (especially when run |
701 |
over SSH), the command will require confirmation unless run with |
702 |
the ``-f`` option. |
703 |
|
704 |
RENEW-CRYPTO |
705 |
~~~~~~~~~~~~ |
706 |
|
707 |
| **renew-crypto** [-f] |
708 |
| [\--new-cluster-certificate] [\--new-confd-hmac-key] |
709 |
| [\--new-rapi-certificate] [\--rapi-certificate *rapi-cert*] |
710 |
| [\--new-spice-certificate | \--spice-certificate *spice-cert* |
711 |
| \--spice-ca-certificate *spice-ca-cert*] |
712 |
| [\--new-cluster-domain-secret] [\--cluster-domain-secret *filename*] |
713 |
|
714 |
This command will stop all Ganeti daemons in the cluster and start |
715 |
them again once the new certificates and keys are replicated. The |
716 |
options ``--new-cluster-certificate`` and ``--new-confd-hmac-key`` |
717 |
can be used to regenerate the cluster-internal SSL certificate |
718 |
respective the HMAC key used by ganeti-confd(8). |
719 |
|
720 |
To generate a new self-signed RAPI certificate (used by |
721 |
ganeti-rapi(8)) specify ``--new-rapi-certificate``. If you want to |
722 |
use your own certificate, e.g. one signed by a certificate |
723 |
authority (CA), pass its filename to ``--rapi-certificate``. |
724 |
|
725 |
To generate a new self-signed SPICE certificate, used by SPICE |
726 |
connections to the KVM hypervisor, specify the |
727 |
``--new-spice-certificate`` option. If you want to provide a |
728 |
certificate, pass its filename to ``--spice-certificate`` and pass the |
729 |
signing CA certificate to ``--spice-ca-certificate``. |
730 |
|
731 |
``--new-cluster-domain-secret`` generates a new, random cluster |
732 |
domain secret. ``--cluster-domain-secret`` reads the secret from a |
733 |
file. The cluster domain secret is used to sign information |
734 |
exchanged between separate clusters via a third party. |
735 |
|
736 |
REPAIR-DISK-SIZES |
737 |
~~~~~~~~~~~~~~~~~ |
738 |
|
739 |
**repair-disk-sizes** [instance...] |
740 |
|
741 |
This command checks that the recorded size of the given instance's |
742 |
disks matches the actual size and updates any mismatches found. |
743 |
This is needed if the Ganeti configuration is no longer consistent |
744 |
with reality, as it will impact some disk operations. If no |
745 |
arguments are given, all instances will be checked. |
746 |
|
747 |
Note that only active disks can be checked by this command; in case |
748 |
a disk cannot be activated it's advised to use |
749 |
**gnt-instance activate-disks \--ignore-size ...** to force |
750 |
activation without regard to the current size. |
751 |
|
752 |
When the all disk sizes are consistent, the command will return no |
753 |
output. Otherwise it will log details about the inconsistencies in |
754 |
the configuration. |
755 |
|
756 |
SEARCH-TAGS |
757 |
~~~~~~~~~~~ |
758 |
|
759 |
**search-tags** {*pattern*} |
760 |
|
761 |
Searches the tags on all objects in the cluster (the cluster |
762 |
itself, the nodes and the instances) for a given pattern. The |
763 |
pattern is interpreted as a regular expression and a search will be |
764 |
done on it (i.e. the given pattern is not anchored to the beggining |
765 |
of the string; if you want that, prefix the pattern with ^). |
766 |
|
767 |
If no tags are matching the pattern, the exit code of the command |
768 |
will be one. If there is at least one match, the exit code will be |
769 |
zero. Each match is listed on one line, the object and the tag |
770 |
separated by a space. The cluster will be listed as /cluster, a |
771 |
node will be listed as /nodes/*name*, and an instance as |
772 |
/instances/*name*. Example: |
773 |
|
774 |
:: |
775 |
|
776 |
# gnt-cluster search-tags time |
777 |
/cluster ctime:2007-09-01 |
778 |
/nodes/node1.example.com mtime:2007-10-04 |
779 |
|
780 |
VERIFY |
781 |
~~~~~~ |
782 |
|
783 |
| **verify** [\--no-nplus1-mem] [\--node-group *nodegroup*] |
784 |
| [\--error-codes] [{-I|\--ignore-errors} *errorcode*] |
785 |
| [{-I|\--ignore-errors} *errorcode*...] |
786 |
|
787 |
Verify correctness of cluster configuration. This is safe with |
788 |
respect to running instances, and incurs no downtime of the |
789 |
instances. |
790 |
|
791 |
If the ``--no-nplus1-mem`` option is given, Ganeti won't check |
792 |
whether if it loses a node it can restart all the instances on |
793 |
their secondaries (and report an error otherwise). |
794 |
|
795 |
With ``--node-group``, restrict the verification to those nodes and |
796 |
instances that live in the named group. This will not verify global |
797 |
settings, but will allow to perform verification of a group while other |
798 |
operations are ongoing in other groups. |
799 |
|
800 |
The ``--error-codes`` option outputs each error in the following |
801 |
parseable format: *ftype*:*ecode*:*edomain*:*name*:*msg*. |
802 |
These fields have the following meaning: |
803 |
|
804 |
ftype |
805 |
Failure type. Can be *WARNING* or *ERROR*. |
806 |
|
807 |
ecode |
808 |
Error code of the failure. See below for a list of error codes. |
809 |
|
810 |
edomain |
811 |
Can be *cluster*, *node* or *instance*. |
812 |
|
813 |
name |
814 |
Contains the name of the item that is affected from the failure. |
815 |
|
816 |
msg |
817 |
Contains a descriptive error message about the error |
818 |
|
819 |
``gnt-cluster verify`` will have a non-zero exit code if at least one of |
820 |
the failures that are found are of type *ERROR*. |
821 |
|
822 |
The ``--ignore-errors`` option can be used to change this behaviour, |
823 |
because it demotes the error represented by the error code received as a |
824 |
parameter to a warning. The option must be repeated for each error that |
825 |
should be ignored (e.g.: ``-I ENODEVERSION -I ENODEORPHANLV``). The |
826 |
``--error-codes`` option can be used to determine the error code of a |
827 |
given error. |
828 |
|
829 |
List of error codes: |
830 |
|
831 |
@CONSTANTS_ECODES@ |
832 |
|
833 |
VERIFY-DISKS |
834 |
~~~~~~~~~~~~ |
835 |
|
836 |
**verify-disks** |
837 |
|
838 |
The command checks which instances have degraded DRBD disks and |
839 |
activates the disks of those instances. |
840 |
|
841 |
This command is run from the **ganeti-watcher** tool, which also |
842 |
has a different, complementary algorithm for doing this check. |
843 |
Together, these two should ensure that DRBD disks are kept |
844 |
consistent. |
845 |
|
846 |
VERSION |
847 |
~~~~~~~ |
848 |
|
849 |
**version** |
850 |
|
851 |
Show the cluster version. |
852 |
|
853 |
.. vim: set textwidth=72 : |
854 |
.. Local Variables: |
855 |
.. mode: rst |
856 |
.. fill-column: 72 |
857 |
.. End: |