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