root / man / gnt-cluster.sgml @ 69affe73
History | View | Annotate | Download (35.2 kB)
1 |
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ |
---|---|
2 |
|
3 |
<!-- Fill in your name for FIRSTNAME and SURNAME. --> |
4 |
<!-- Please adjust the date whenever revising the manpage. --> |
5 |
<!ENTITY dhdate "<date>June 08, 2010</date>"> |
6 |
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are |
7 |
allowed: see man(7), man(1). --> |
8 |
<!ENTITY dhsection "<manvolnum>8</manvolnum>"> |
9 |
<!ENTITY dhucpackage "<refentrytitle>gnt-cluster</refentrytitle>"> |
10 |
<!ENTITY dhpackage "gnt-cluster"> |
11 |
|
12 |
<!ENTITY debian "<productname>Debian</productname>"> |
13 |
<!ENTITY gnu "<acronym>GNU</acronym>"> |
14 |
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>"> |
15 |
<!ENTITY footer SYSTEM "footer.sgml"> |
16 |
]> |
17 |
|
18 |
<refentry> |
19 |
<refentryinfo> |
20 |
<copyright> |
21 |
<year>2006</year> |
22 |
<year>2007</year> |
23 |
<year>2008</year> |
24 |
<year>2009</year> |
25 |
<holder>Google Inc.</holder> |
26 |
</copyright> |
27 |
&dhdate; |
28 |
</refentryinfo> |
29 |
<refmeta> |
30 |
&dhucpackage; |
31 |
|
32 |
&dhsection; |
33 |
<refmiscinfo>Ganeti 2.2</refmiscinfo> |
34 |
</refmeta> |
35 |
<refnamediv> |
36 |
<refname>&dhpackage;</refname> |
37 |
|
38 |
<refpurpose>Ganeti administration, cluster-wide</refpurpose> |
39 |
</refnamediv> |
40 |
<refsynopsisdiv> |
41 |
<cmdsynopsis> |
42 |
<command>&dhpackage; </command> |
43 |
|
44 |
<arg choice="req">command</arg> |
45 |
<arg>arguments...</arg> |
46 |
</cmdsynopsis> |
47 |
</refsynopsisdiv> |
48 |
<refsect1> |
49 |
<title>DESCRIPTION</title> |
50 |
|
51 |
<para> |
52 |
The <command>&dhpackage;</command> is used for cluster-wide |
53 |
administration in the Ganeti system. |
54 |
</para> |
55 |
|
56 |
</refsect1> |
57 |
<refsect1> |
58 |
<title>COMMANDS</title> |
59 |
|
60 |
<refsect2> |
61 |
<title>ADD-TAGS</title> |
62 |
|
63 |
<cmdsynopsis> |
64 |
<command>add-tags</command> |
65 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
66 |
<arg choice="req" |
67 |
rep="repeat"><replaceable>tag</replaceable></arg> |
68 |
</cmdsynopsis> |
69 |
|
70 |
<para> |
71 |
Add tags to the cluster. If any of the tags contains invalid |
72 |
characters, the entire operation will abort. |
73 |
</para> |
74 |
|
75 |
<para> |
76 |
If the <option>--from</option> option is given, the list of |
77 |
tags will be extended with the contents of that file (each |
78 |
line becomes a tag). In this case, there is not need to pass |
79 |
tags on the command line (if you do, both sources will be |
80 |
used). A file name of - will be interpreted as stdin. |
81 |
</para> |
82 |
</refsect2> |
83 |
|
84 |
<refsect2> |
85 |
<title>COMMAND</title> |
86 |
|
87 |
<cmdsynopsis> |
88 |
<command>command</command> |
89 |
<arg>-n <replaceable>node</replaceable></arg> |
90 |
<arg choice="req"><replaceable>command</replaceable></arg> |
91 |
</cmdsynopsis> |
92 |
|
93 |
<para> |
94 |
Executes a command on all nodes. If the option |
95 |
<option>-n</option> is not given, the command will be executed |
96 |
on all nodes, otherwise it will be executed only on the |
97 |
node(s) specified. Use the option multiple times for running |
98 |
it on multiple nodes, like: |
99 |
|
100 |
<screen> |
101 |
# gnt-cluster command -n node1.example.com -n node2.example.com date |
102 |
</screen> |
103 |
|
104 |
</para> |
105 |
|
106 |
<para> |
107 |
The command is executed serially on the selected nodes. If the |
108 |
master node is present in the list, the command will be |
109 |
executed last on the master. Regarding the other nodes, the |
110 |
execution order is somewhat alphabetic, so that |
111 |
node2.example.com will be earlier than node10.example.com but |
112 |
after node1.example.com. |
113 |
</para> |
114 |
|
115 |
<para> |
116 |
So given the node names node1, node2, node3, node10, node11, |
117 |
with node3 being the master, the order will be: node1, node2, |
118 |
node10, node11, node3. |
119 |
</para> |
120 |
|
121 |
<para> |
122 |
The command is constructed by concatenating all other command |
123 |
line arguments. For example, to list the contents of the |
124 |
<filename class="directory">/etc</filename> directory on all |
125 |
nodes, run: |
126 |
|
127 |
<screen> |
128 |
# gnt-cluster command ls -l /etc |
129 |
</screen> |
130 |
|
131 |
and the command which will be executed will be |
132 |
<computeroutput>"ls -l /etc"</computeroutput> |
133 |
</para> |
134 |
</refsect2> |
135 |
|
136 |
<refsect2> |
137 |
<title>COPYFILE</title> |
138 |
|
139 |
<cmdsynopsis> |
140 |
<command>copyfile</command> |
141 |
<arg>--use-replication-network</arg> |
142 |
<arg>-n <replaceable>node</replaceable></arg> |
143 |
<arg choice="req"><replaceable>file</replaceable></arg> |
144 |
</cmdsynopsis> |
145 |
|
146 |
<para> |
147 |
Copies a file to all or to some nodes. The argument specifies |
148 |
the source file (on the current system), the |
149 |
<option>-n</option> argument specifies the target node, or |
150 |
nodes if the option is given multiple times. If |
151 |
<option>-n</option> is not given at all, the file will be |
152 |
copied to all nodes. |
153 |
|
154 |
Passing the <option>--use-replication-network</option> option |
155 |
will cause the copy to be done over the replication network |
156 |
(only matters if the primary/secondary IPs are different). |
157 |
|
158 |
Example: |
159 |
<screen> |
160 |
# gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test |
161 |
</screen> |
162 |
|
163 |
This will copy the file <filename>/tmp/test</filename> from |
164 |
the current node to the two named nodes. |
165 |
</para> |
166 |
</refsect2> |
167 |
|
168 |
<refsect2> |
169 |
<title>DESTROY</title> |
170 |
|
171 |
<cmdsynopsis> |
172 |
<command>destroy</command> |
173 |
<arg choice="req">--yes-do-it</arg> |
174 |
</cmdsynopsis> |
175 |
|
176 |
<para> |
177 |
Remove all configuration files related to the cluster, so that |
178 |
a <command>gnt-cluster init</command> can be done again |
179 |
afterwards. |
180 |
</para> |
181 |
|
182 |
<para> |
183 |
Since this is a dangerous command, you are required to pass |
184 |
the argument <replaceable>--yes-do-it.</replaceable> |
185 |
</para> |
186 |
</refsect2> |
187 |
|
188 |
<refsect2> |
189 |
<title>GETMASTER</title> |
190 |
|
191 |
<cmdsynopsis> |
192 |
<command>getmaster</command> |
193 |
</cmdsynopsis> |
194 |
|
195 |
<para> |
196 |
Displays the current master node. |
197 |
</para> |
198 |
</refsect2> |
199 |
|
200 |
<refsect2> |
201 |
<title>INFO</title> |
202 |
|
203 |
<cmdsynopsis> |
204 |
<command>info</command> |
205 |
<arg>--roman</arg> |
206 |
</cmdsynopsis> |
207 |
|
208 |
<para> |
209 |
Shows runtime cluster information: cluster name, architecture |
210 |
(32 or 64 bit), master node, node list and instance list. |
211 |
</para> |
212 |
|
213 |
<para> |
214 |
Passing the <option>--roman</option> option gnt-cluster info will try |
215 |
to print its integer fields in a latin friendly way. This allows |
216 |
further diffusion of Ganeti among ancient cultures. |
217 |
</para> |
218 |
|
219 |
</refsect2> |
220 |
|
221 |
<refsect2> |
222 |
<title>INIT</title> |
223 |
|
224 |
<cmdsynopsis> |
225 |
<command>init</command> |
226 |
<sbr> |
227 |
<arg>-s <replaceable>secondary_ip</replaceable></arg> |
228 |
<sbr> |
229 |
<arg>-g <replaceable>vg-name</replaceable></arg> |
230 |
<sbr> |
231 |
<arg>--master-netdev <replaceable>interface-name</replaceable></arg> |
232 |
<sbr> |
233 |
<arg>-m <replaceable>mac-prefix</replaceable></arg> |
234 |
<sbr> |
235 |
<arg>--no-lvm-storage</arg> |
236 |
<sbr> |
237 |
<arg>--no-etc-hosts</arg> |
238 |
<sbr> |
239 |
<arg>--no-ssh-init</arg> |
240 |
<sbr> |
241 |
<arg>--file-storage-dir <replaceable>dir</replaceable></arg> |
242 |
<sbr> |
243 |
<arg>--enabled-hypervisors <replaceable>hypervisors</replaceable></arg> |
244 |
<sbr> |
245 |
<arg>-t <replaceable>hypervisor name</replaceable></arg> |
246 |
<sbr> |
247 |
<arg>--hypervisor-parameters <replaceable>hypervisor</replaceable>:<replaceable>hv-param</replaceable>=<replaceable>value</replaceable><arg rep="repeat" choice="opt">,<replaceable>hv-param</replaceable>=<replaceable>value</replaceable></arg></arg> |
248 |
<sbr> |
249 |
<arg>--backend-parameters <replaceable>be-param</replaceable>=<replaceable>value</replaceable><arg rep="repeat" choice="opt">,<replaceable>be-param</replaceable>=<replaceable>value</replaceable></arg></arg> |
250 |
<sbr> |
251 |
<arg>--nic-parameters <replaceable>nic-param</replaceable>=<replaceable>value</replaceable><arg rep="repeat" choice="opt">,<replaceable>nic-param</replaceable>=<replaceable>value</replaceable></arg></arg> |
252 |
<sbr> |
253 |
<arg>--maintain-node-health <group choice="req"><arg>yes</arg><arg>no</arg></group></arg> |
254 |
<sbr> |
255 |
<arg>--uid-pool <replaceable>user-id pool definition</replaceable></arg> |
256 |
<sbr> |
257 |
<arg>-I <replaceable>default instance allocator</replaceable></arg> |
258 |
<sbr> |
259 |
<arg>--primary-ip-version <replaceable>version</replaceable></arg> |
260 |
<sbr> |
261 |
<arg choice="req"><replaceable>clustername</replaceable></arg> |
262 |
</cmdsynopsis> |
263 |
|
264 |
<para> |
265 |
This commands is only run once initially on the first node of |
266 |
the cluster. It will initialize the cluster configuration and |
267 |
setup ssh-keys and more. |
268 |
</para> |
269 |
|
270 |
<para> |
271 |
Note that the <replaceable>clustername</replaceable> is not |
272 |
any random name. It has to be resolvable to an IP address |
273 |
using DNS, and it is best if you give the fully-qualified |
274 |
domain name. This hostname must resolve to an IP address |
275 |
reserved exclusively for this purpose. |
276 |
</para> |
277 |
|
278 |
<para> |
279 |
The cluster can run in two modes: single-home or |
280 |
dual-homed. In the first case, all traffic (both public |
281 |
traffic, inter-node traffic and data replication traffic) goes |
282 |
over the same interface. In the dual-homed case, the data |
283 |
replication traffic goes over the second network. The |
284 |
<option>-s</option> option here marks the cluster as |
285 |
dual-homed and its parameter represents this node's address on |
286 |
the second network. If you initialise the cluster with |
287 |
<option>-s</option>, all nodes added must have a secondary IP |
288 |
as well. |
289 |
</para> |
290 |
|
291 |
<para> |
292 |
Note that for Ganeti it doesn't matter if the secondary |
293 |
network is actually a separate physical network, or is done |
294 |
using tunneling, etc. For performance reasons, it's |
295 |
recommended to use a separate network, of course. |
296 |
</para> |
297 |
|
298 |
<para> |
299 |
The <option>-g</option> option will let you specify a volume group |
300 |
different than "xenvg" for Ganeti to use when creating instance disks. |
301 |
This volume group must have the same name on all nodes. Once the |
302 |
cluster is initialized this can be altered by using the |
303 |
<command>modify</command> command. If you don't want to use lvm |
304 |
storage at all use the <option>--no-lvm-storage</option> option. |
305 |
Once the cluster is initialized you can change this setup with the |
306 |
<command>modify</command> command. |
307 |
</para> |
308 |
|
309 |
<para> |
310 |
The <option>--master-netdev</option> option is useful for specifying a |
311 |
different interface on which the master will activate its IP address. |
312 |
It's important that all nodes have this interface because you'll need |
313 |
it for a master failover. |
314 |
</para> |
315 |
|
316 |
<para> |
317 |
The <option>-m</option> option will let you specify a three byte prefix |
318 |
under which the virtual MAC addresses of your instances will be |
319 |
generated. The prefix must be specified in the format XX:XX:XX and the |
320 |
default is aa:00:00. |
321 |
</para> |
322 |
|
323 |
<para> |
324 |
The <option>--no-lvm-storage</option> option allows you to initialize |
325 |
the cluster without lvm support. This means that only instances using |
326 |
files as storage backend will be possible to create. Once the cluster |
327 |
is initialized you can change this setup with the |
328 |
<command>modify</command> command. |
329 |
</para> |
330 |
|
331 |
<para> |
332 |
The <option>--no-etc-hosts</option> option allows you to initialize the |
333 |
cluster without modifying the <filename>/etc/hosts</filename> file. |
334 |
</para> |
335 |
|
336 |
<para> |
337 |
The <option>--no-ssh-init</option> option allows you to initialize the |
338 |
cluster without creating or distributing SSH key pairs. |
339 |
</para> |
340 |
|
341 |
<para> |
342 |
The <option>--file-storage-dir</option> option allows you |
343 |
set the directory to use for storing the instance disk |
344 |
files when using file storage as backend for instance disks. |
345 |
</para> |
346 |
|
347 |
<para> |
348 |
The <option>--enabled-hypervisors</option> option allows you |
349 |
to set the list of hypervisors that will be enabled for |
350 |
this cluster. Instance hypervisors can only be chosen from |
351 |
the list of enabled hypervisors, and the first entry of this list |
352 |
will be used by default. Currently, the following hypervisors are |
353 |
available: |
354 |
</para> |
355 |
|
356 |
<para> |
357 |
<variablelist> |
358 |
<varlistentry> |
359 |
<term>xen-pvm</term> |
360 |
<listitem> |
361 |
<para> |
362 |
Xen PVM hypervisor |
363 |
</para> |
364 |
</listitem> |
365 |
</varlistentry> |
366 |
<varlistentry> |
367 |
<term>xen-hvm</term> |
368 |
<listitem> |
369 |
<para> |
370 |
Xen HVM hypervisor |
371 |
</para> |
372 |
</listitem> |
373 |
</varlistentry> |
374 |
<varlistentry> |
375 |
<term>kvm</term> |
376 |
<listitem> |
377 |
<para> |
378 |
Linux KVM hypervisor |
379 |
</para> |
380 |
</listitem> |
381 |
</varlistentry> |
382 |
<varlistentry> |
383 |
<term>chroot</term> |
384 |
<listitem> |
385 |
<para> |
386 |
a simple chroot manager that starts chroot based on a |
387 |
script at the root of the filesystem holding the |
388 |
chroot |
389 |
<varlistentry> |
390 |
<term>fake</term> |
391 |
<listitem> |
392 |
<para> |
393 |
fake hypervisor for development/testing |
394 |
</para> |
395 |
</listitem> |
396 |
</varlistentry> |
397 |
</variablelist> |
398 |
</para> |
399 |
|
400 |
<para> |
401 |
Either a single hypervisor name or a comma-separated list of |
402 |
hypervisor names can be specified. If this option is not |
403 |
specified, only the xen-pvm hypervisor is enabled by default. |
404 |
</para> |
405 |
|
406 |
<para> |
407 |
The <option>--hypervisor-parameters</option> option allows you |
408 |
to set default hypervisor specific parameters for the |
409 |
cluster. The format of this option is the name of the |
410 |
hypervisor, followed by a colon and a comma-separated list of |
411 |
key=value pairs. The keys available for each hypervisors are |
412 |
detailed in the <citerefentry> |
413 |
<refentrytitle>gnt-instance</refentrytitle> |
414 |
<manvolnum>8</manvolnum> </citerefentry> man page, in the |
415 |
<command>add</command> command plus the following parameters |
416 |
which are only configurable globally (at cluster level): |
417 |
|
418 |
<variablelist> |
419 |
<varlistentry> |
420 |
<term>migration_port</term> |
421 |
<listitem> |
422 |
<simpara>Valid for the Xen PVM and KVM hypervisors.</simpara> |
423 |
|
424 |
<para> |
425 |
This options specifies the TCP port to use for |
426 |
live-migration. For Xen, the same port should be |
427 |
configured on all nodes in |
428 |
the <filename>/etc/xen/xend-config.sxp</filename> |
429 |
file, under the |
430 |
key <quote>xend-relocation-port</quote>. |
431 |
</para> |
432 |
</listitem> |
433 |
</varlistentry> |
434 |
<varlistentry> |
435 |
<term>migration_bandwidth</term> |
436 |
<listitem> |
437 |
<simpara>Valid for the KVM hypervisor.</simpara> |
438 |
|
439 |
<para> |
440 |
This option specifies the maximum bandwidth that KVM will |
441 |
use for instance live migrations. The value is in MiB/s. |
442 |
</para> |
443 |
|
444 |
<simpara>This option is only effective with kvm versions >= 78 |
445 |
and qemu-kvm versions >= 0.10.0. |
446 |
</simpara> |
447 |
</listitem> |
448 |
</varlistentry> |
449 |
</variablelist> |
450 |
|
451 |
</para> |
452 |
|
453 |
<para> |
454 |
The <option>--backend-parameters</option> option allows you to set |
455 |
the default backend parameters for the cluster. The parameter |
456 |
format is a comma-separated list of key=value pairs with the |
457 |
following supported keys: |
458 |
</para> |
459 |
|
460 |
<para> |
461 |
<variablelist> |
462 |
<varlistentry> |
463 |
<term>vcpus</term> |
464 |
<listitem> |
465 |
<para> |
466 |
Number of VCPUs to set for an instance by default, must |
467 |
be an integer, will be set to 1 if no specified. |
468 |
</para> |
469 |
</listitem> |
470 |
</varlistentry> |
471 |
<varlistentry> |
472 |
<term>memory</term> |
473 |
<listitem> |
474 |
<para> |
475 |
Amount of memory to allocate for an instance by default, |
476 |
can be either an integer or an integer followed by a |
477 |
unit (M for mebibytes and G for gibibytes are |
478 |
supported), will be set to 128M if not specified. |
479 |
</para> |
480 |
</listitem> |
481 |
</varlistentry> |
482 |
<varlistentry> |
483 |
<term>auto_balance</term> |
484 |
<listitem> |
485 |
<para> |
486 |
Value of the auto_balance flag for instances to use by |
487 |
default, will be set to true if not specified. |
488 |
</para> |
489 |
</listitem> |
490 |
</varlistentry> |
491 |
</variablelist> |
492 |
</para> |
493 |
|
494 |
<para> |
495 |
The <option>--nic-parameters</option> option allows you to set |
496 |
the default nic parameters for the cluster. The parameter |
497 |
format is a comma-separated list of key=value pairs with the |
498 |
following supported keys: |
499 |
<variablelist> |
500 |
<varlistentry> |
501 |
<term>mode</term> |
502 |
<listitem> |
503 |
<para> |
504 |
The default nic mode, 'routed' or 'bridged'. |
505 |
</para> |
506 |
</listitem> |
507 |
</varlistentry> |
508 |
<varlistentry> |
509 |
<term>link</term> |
510 |
<listitem> |
511 |
<para> |
512 |
In bridged mode the default NIC bridge. In routed mode it |
513 |
represents an hypervisor-vif-script dependent value to allow |
514 |
different instance groups. For example under the KVM default |
515 |
network script it is interpreted as a routing table number or |
516 |
name. |
517 |
</para> |
518 |
</listitem> |
519 |
</varlistentry> |
520 |
</variablelist> |
521 |
</para> |
522 |
|
523 |
<para> |
524 |
The option <option>--maintain-node-health</option> allows to |
525 |
enable/disable automatic maintenance actions on |
526 |
nodes. Currently these include automatic shutdown of instances |
527 |
and deactivation of DRBD devices on offline nodes; in the |
528 |
future it might be extended to automatic removal of unknown |
529 |
LVM volumes, etc. |
530 |
</para> |
531 |
|
532 |
<para> |
533 |
The <option>--uid-pool</option> option initializes the user-id pool. |
534 |
The <replaceable>user-id pool definition</replaceable> can contain a |
535 |
list of user-ids and/or a list of user-id ranges. The parameter format |
536 |
is a comma-separated list of numeric user-ids or user-id ranges. |
537 |
The ranges are defined by a lower and higher boundary, separated |
538 |
by a dash. The boundaries are inclusive. |
539 |
If the <option>--uid-pool</option> option is not supplied, the |
540 |
user-id pool is initialized to an empty list. An empty list means that |
541 |
the user-id pool feature is disabled. |
542 |
</para> |
543 |
|
544 |
<para> |
545 |
The <option>-I (--default-iallocator)</option> option specifies the |
546 |
default instance allocator. The instance allocator will be used for |
547 |
operations like instance creation, instance and node migration, etc. |
548 |
when no manual override is specified. If this option is not specified, |
549 |
the default instance allocator will be blank, which means that relevant |
550 |
operations will require the administrator to manually specify either an |
551 |
instance allocator, or a set of nodes. |
552 |
The default iallocator can be changed later using the |
553 |
<command>modify</command> command. |
554 |
</para> |
555 |
|
556 |
<para> |
557 |
The <option>--primary-ip-version</option> option specifies the |
558 |
IP version used for the primary address. Possible values are 4 and |
559 |
6 for IPv4 and IPv6, respectively. This option is used when resolving |
560 |
node names and the cluster name. |
561 |
</para> |
562 |
|
563 |
</refsect2> |
564 |
|
565 |
<refsect2> |
566 |
<title>LIST-TAGS</title> |
567 |
|
568 |
<cmdsynopsis> |
569 |
<command>list-tags</command> |
570 |
</cmdsynopsis> |
571 |
|
572 |
<para>List the tags of the cluster.</para> |
573 |
</refsect2> |
574 |
|
575 |
<refsect2> |
576 |
<title>MASTER-FAILOVER</title> |
577 |
|
578 |
<cmdsynopsis> |
579 |
<command>master-failover</command> |
580 |
<arg>--no-voting</arg> |
581 |
</cmdsynopsis> |
582 |
|
583 |
<para> |
584 |
Failover the master role to the current node. |
585 |
</para> |
586 |
|
587 |
<para> |
588 |
The <option>--no-voting</option> option skips the remote node agreement |
589 |
checks. This is dangerous, but necessary in some cases (for example |
590 |
failing over the master role in a 2 node cluster with the original |
591 |
master down). If the original master then comes up, it won't be able to |
592 |
start its master daemon because it won't have enough votes, but so |
593 |
won't the new master, if the master daemon ever needs a restart. You |
594 |
can pass <option>--no-voting</option> to |
595 |
<command>ganeti-masterd</command> on the new master to solve this |
596 |
problem, and run <command>gnt-cluster redist-conf</command> to make |
597 |
sure the cluster is consistent again. |
598 |
</para> |
599 |
|
600 |
</refsect2> |
601 |
|
602 |
<refsect2> |
603 |
<title>MASTER-PING</title> |
604 |
|
605 |
<cmdsynopsis> |
606 |
<command>master-ping</command> |
607 |
</cmdsynopsis> |
608 |
|
609 |
<para> |
610 |
Checks if the master daemon is alive. |
611 |
</para> |
612 |
|
613 |
<para> |
614 |
If the master daemon is alive and can respond to a basic query |
615 |
(the equivalent of <command>gnt-cluster info</command>), then |
616 |
the exit code of the command will be 0. If the master daemon |
617 |
is not alive (either due to a crash or because this is not the |
618 |
master node), the exit code will be 1. |
619 |
</para> |
620 |
|
621 |
</refsect2> |
622 |
|
623 |
<refsect2> |
624 |
<title>MODIFY</title> |
625 |
|
626 |
<cmdsynopsis> |
627 |
<command>modify</command> |
628 |
<sbr> |
629 |
<arg choice="opt">-g <replaceable>vg-name</replaceable></arg> |
630 |
<sbr> |
631 |
<arg choice="opt">--no-lvm-storage</arg> |
632 |
<sbr> |
633 |
<arg choice="opt">--enabled-hypervisors |
634 |
<replaceable>hypervisors</replaceable></arg> |
635 |
<sbr> |
636 |
<arg choice="opt">--hypervisor-parameters <replaceable>hypervisor</replaceable>:<replaceable>hv-param</replaceable>=<replaceable>value</replaceable><arg rep="repeat" choice="opt">,<replaceable>hv-param</replaceable>=<replaceable>value</replaceable></arg></arg> |
637 |
<sbr> |
638 |
<arg choice="opt">--backend-parameters <replaceable>be-param</replaceable>=<replaceable>value</replaceable><arg rep="repeat" choice="opt">,<replaceable>be-param</replaceable>=<replaceable>value</replaceable></arg></arg> |
639 |
<sbr> |
640 |
<arg choice="opt">--nic-parameters <replaceable>nic-param</replaceable>=<replaceable>value</replaceable><arg rep="repeat" choice="opt">,<replaceable>nic-param</replaceable>=<replaceable>value</replaceable></arg></arg> |
641 |
<sbr> |
642 |
<arg choice="opt">--uid-pool <replaceable>user-id pool definition</replaceable></arg> |
643 |
<sbr> |
644 |
<arg choice="opt">--add-uids <replaceable>user-id pool definition</replaceable></arg> |
645 |
<sbr> |
646 |
<arg choice="opt">--remove-uids <replaceable>user-id pool definition</replaceable></arg> |
647 |
<sbr> |
648 |
<arg choice="opt">-C <replaceable>candidate_pool_size</replaceable></arg> |
649 |
<sbr> |
650 |
<arg>--maintain-node-health <group choice="req"><arg>yes</arg><arg>no</arg></group></arg> |
651 |
<sbr> |
652 |
<arg choice="opt">-I <replaceable>default instance allocator</replaceable></arg> |
653 |
|
654 |
<sbr> |
655 |
<arg>--reserved-lvs=<replaceable>NAMES</replaceable></arg> |
656 |
|
657 |
</cmdsynopsis> |
658 |
|
659 |
<para> |
660 |
Modify the options for the cluster. |
661 |
</para> |
662 |
|
663 |
<para> |
664 |
The <option>-g</option>, <option>--no-lvm-storarge</option>, |
665 |
<option>--enabled-hypervisors</option>, |
666 |
<option>--hypervisor-parameters</option>, |
667 |
<option>--backend-parameters</option>, |
668 |
<option>--nic-parameters</option>, |
669 |
<option>--maintain-node-health</option>, |
670 |
<option>--uid-pool</option> and |
671 |
<option>-I</option> options are |
672 |
described in the <command>init</command> command. |
673 |
</para> |
674 |
|
675 |
<para> |
676 |
The <option>-C</option> option specifies the |
677 |
<varname>candidate_pool_size</varname> cluster parameter. This |
678 |
is the number of nodes that the master will try to keep as |
679 |
<literal>master_candidates</literal>. For more details about |
680 |
this role and other node roles, see the <citerefentry> |
681 |
<refentrytitle>ganeti</refentrytitle><manvolnum>7</manvolnum> |
682 |
</citerefentry>. If you increase the size, the master will |
683 |
automatically promote as many nodes as required and possible |
684 |
to reach the intended number. |
685 |
</para> |
686 |
|
687 |
<para> |
688 |
The <option>--add-uids</option> and <option>--remove-uids</option> |
689 |
options can be used to modify the user-id pool by adding/removing |
690 |
a list of user-ids or user-id ranges. |
691 |
</para> |
692 |
|
693 |
<para> |
694 |
The option <option>--reserved-lvs</option> specifies a list |
695 |
(comma-separated) of logical volume group names (regular |
696 |
expressions) that will be ignored by the cluster verify |
697 |
operation. This is useful if the volume group used for Ganeti |
698 |
is shared with the system for other uses. Note that it's not |
699 |
recommended to create and mark as ignored logical volume names |
700 |
which match Ganeti's own name format (starting with UUID and |
701 |
then <literal>.diskN</literal>), as this option only skips the |
702 |
verification, but not the actual use of the names given. |
703 |
</para> |
704 |
|
705 |
<para> |
706 |
To remove all reserved logical volumes, pass in an empty |
707 |
argument to the option, as in <option>--reserved-lvs=</option> |
708 |
or <option>--reserved-lvs ''</option>. |
709 |
</para> |
710 |
|
711 |
</refsect2> |
712 |
|
713 |
<refsect2> |
714 |
<title>QUEUE</title> |
715 |
|
716 |
<cmdsynopsis> |
717 |
<command>queue</command> |
718 |
<arg choice="opt">drain</arg> |
719 |
<arg choice="opt">undrain</arg> |
720 |
<arg choice="opt">info</arg> |
721 |
|
722 |
</cmdsynopsis> |
723 |
|
724 |
<para> |
725 |
Change job queue properties. |
726 |
</para> |
727 |
|
728 |
<para> |
729 |
The <option>drain</option> option sets the drain flag on the |
730 |
job queue. No new jobs will be accepted, but jobs already in |
731 |
the queue will be processed. |
732 |
</para> |
733 |
|
734 |
<para> |
735 |
The <option>undrain</option> will unset the drain flag on the |
736 |
job queue. New jobs will be accepted. |
737 |
</para> |
738 |
|
739 |
<para> |
740 |
The <option>info</option> option shows the properties of the |
741 |
job queue. |
742 |
</para> |
743 |
</refsect2> |
744 |
|
745 |
<refsect2> |
746 |
<title>WATCHER</title> |
747 |
|
748 |
<cmdsynopsis> |
749 |
<command>watcher</command> |
750 |
<group choice="req"> |
751 |
<arg>pause <replaceable>duration</replaceable></arg> |
752 |
<arg>continue</arg> |
753 |
<arg>info</arg> |
754 |
</group> |
755 |
</cmdsynopsis> |
756 |
|
757 |
<para> |
758 |
Make the watcher pause or let it continue. |
759 |
</para> |
760 |
|
761 |
<para> |
762 |
The <option>pause</option> option causes the watcher to pause for |
763 |
<replaceable>duration</replaceable> seconds. |
764 |
</para> |
765 |
|
766 |
<para> |
767 |
The <option>continue</option> option will let the watcher continue. |
768 |
</para> |
769 |
|
770 |
<para> |
771 |
The <option>info</option> option shows whether the watcher is currently |
772 |
paused. |
773 |
</para> |
774 |
</refsect2> |
775 |
|
776 |
<refsect2> |
777 |
<title>redist-conf</title> |
778 |
<cmdsynopsis> |
779 |
<command>redist-conf</command> |
780 |
<arg>--submit</arg> |
781 |
</cmdsynopsis> |
782 |
|
783 |
<para> |
784 |
This command forces a full push of configuration files from |
785 |
the master node to the other nodes in the cluster. This is |
786 |
normally not needed, but can be run if the |
787 |
<command>verify</command> complains about configuration |
788 |
mismatches. |
789 |
</para> |
790 |
|
791 |
<para> |
792 |
The <option>--submit</option> option is used to send the job |
793 |
to the master daemon but not wait for its completion. The job |
794 |
ID will be shown so that it can be examined via |
795 |
<command>gnt-job info</command>. |
796 |
</para> |
797 |
|
798 |
</refsect2> |
799 |
<refsect2> |
800 |
<title>REMOVE-TAGS</title> |
801 |
|
802 |
<cmdsynopsis> |
803 |
<command>remove-tags</command> |
804 |
<arg choice="opt">--from <replaceable>file</replaceable></arg> |
805 |
<arg choice="req" |
806 |
rep="repeat"><replaceable>tag</replaceable></arg> |
807 |
</cmdsynopsis> |
808 |
|
809 |
<para> |
810 |
Remove tags from the cluster. If any of the tags are not |
811 |
existing on the cluster, the entire operation will abort. |
812 |
</para> |
813 |
|
814 |
<para> |
815 |
If the <option>--from</option> option is given, the list of |
816 |
tags will be extended with the contents of that file (each |
817 |
line becomes a tag). In this case, there is not need to pass |
818 |
tags on the command line (if you do, both sources will be |
819 |
used). A file name of - will be interpreted as stdin. |
820 |
</para> |
821 |
</refsect2> |
822 |
|
823 |
<refsect2> |
824 |
<title>RENAME</title> |
825 |
|
826 |
<cmdsynopsis> |
827 |
<command>rename</command> |
828 |
<arg>-f</arg> |
829 |
<arg choice="req"><replaceable>name</replaceable></arg> |
830 |
</cmdsynopsis> |
831 |
|
832 |
<para> |
833 |
Renames the cluster and in the process updates the master IP |
834 |
address to the one the new name resolves to. At least one of |
835 |
either the name or the IP address must be different, otherwise |
836 |
the operation will be aborted. |
837 |
</para> |
838 |
|
839 |
<para> |
840 |
Note that since this command can be dangerous (especially when |
841 |
run over SSH), the command will require confirmation unless |
842 |
run with the <option>-f</option> option. |
843 |
</para> |
844 |
</refsect2> |
845 |
|
846 |
<refsect2> |
847 |
<title>RENEW-CRYPTO</title> |
848 |
|
849 |
<cmdsynopsis> |
850 |
<command>renew-crypto</command> |
851 |
<arg>-f</arg> |
852 |
<sbr> |
853 |
<arg choice="opt">--new-cluster-certificate</arg> |
854 |
<arg choice="opt">--new-confd-hmac-key</arg> |
855 |
<sbr> |
856 |
<arg choice="opt">--new-rapi-certificate</arg> |
857 |
<arg choice="opt">--rapi-certificate <replaceable>rapi-cert</replaceable></arg> |
858 |
<sbr> |
859 |
<arg choice="opt">--new-cluster-domain-secret</arg> |
860 |
<arg choice="opt">--cluster-domain-secret <replaceable>filename</replaceable></arg> |
861 |
</cmdsynopsis> |
862 |
|
863 |
<para> |
864 |
This command will stop all |
865 |
Ganeti daemons in the cluster and start them again once the new |
866 |
certificates and keys are replicated. The options |
867 |
<option>--new-cluster-certificate</option> and |
868 |
<option>--new-confd-hmac-key</option> can be used to regenerate the |
869 |
cluster-internal SSL certificate respective the HMAC key used by |
870 |
<citerefentry> |
871 |
<refentrytitle>ganeti-confd</refentrytitle><manvolnum>8</manvolnum> |
872 |
</citerefentry>. |
873 |
</para> |
874 |
|
875 |
<para> |
876 |
To generate a new self-signed RAPI certificate (used by <citerefentry> |
877 |
<refentrytitle>ganeti-rapi</refentrytitle><manvolnum>8</manvolnum> |
878 |
</citerefentry>) specify <option>--new-rapi-certificate</option>. If |
879 |
you want to use your own certificate, e.g. one signed by a certificate |
880 |
authority (CA), pass its filename to |
881 |
<option>--rapi-certificate</option>. |
882 |
</para> |
883 |
|
884 |
<para> |
885 |
<option>--new-cluster-domain-secret</option> generates a new, random |
886 |
cluster domain secret. <option>--cluster-domain-secret</option> reads |
887 |
the secret from a file. The cluster domain secret is used to sign |
888 |
information exchanged between separate clusters via a third party. |
889 |
</para> |
890 |
</refsect2> |
891 |
|
892 |
<refsect2> |
893 |
<title>REPAIR-DISK-SIZES</title> |
894 |
|
895 |
<cmdsynopsis> |
896 |
<command>repair-disk-sizes</command> |
897 |
<arg rep="repeat">instance</arg> |
898 |
</cmdsynopsis> |
899 |
|
900 |
<para> |
901 |
This command checks that the recorded size of the given |
902 |
instance's disks matches the actual size and updates any |
903 |
mismatches found. This is needed if the Ganeti configuration |
904 |
is no longer consistent with reality, as it will impact some |
905 |
disk operations. If no arguments are given, all instances will |
906 |
be checked. |
907 |
</para> |
908 |
|
909 |
<para> |
910 |
Note that only active disks can be checked by this command; in |
911 |
case a disk cannot be activated it's advised to use |
912 |
<command>gnt-instance activate-disks --ignore-size ...</command> to |
913 |
force activation without regard to the |
914 |
current size. |
915 |
</para> |
916 |
|
917 |
<para> |
918 |
When the all disk sizes are consistent, the command will |
919 |
return no output. Otherwise it will log details about the |
920 |
inconsistencies in the configuration. |
921 |
</para> |
922 |
</refsect2> |
923 |
|
924 |
<refsect2> |
925 |
<title>SEARCH-TAGS</title> |
926 |
|
927 |
<cmdsynopsis> |
928 |
<command>search-tags</command> |
929 |
<arg choice="req"><replaceable>pattern</replaceable></arg> |
930 |
</cmdsynopsis> |
931 |
|
932 |
<para> |
933 |
Searches the tags on all objects in the cluster (the cluster |
934 |
itself, the nodes and the instances) for a given pattern. The |
935 |
pattern is interpreted as a regular expression and a search |
936 |
will be done on it (i.e. the given pattern is not anchored to |
937 |
the beggining of the string; if you want that, prefix the |
938 |
pattern with <literal>^</literal>). |
939 |
</para> |
940 |
|
941 |
<para> |
942 |
If no tags are matching the pattern, the exit code of the |
943 |
command will be one. If there is at least one match, the exit |
944 |
code will be zero. Each match is listed on one line, the |
945 |
object and the tag separated by a space. The cluster will be |
946 |
listed as <filename>/cluster</filename>, a node will be listed |
947 |
as |
948 |
<filename>/nodes/<replaceable>name</replaceable></filename>, |
949 |
and an instance as |
950 |
<filename>/instances/<replaceable>name</replaceable></filename>. |
951 |
Example: |
952 |
</para> |
953 |
<screen> |
954 |
# gnt-cluster search-tags time |
955 |
/cluster ctime:2007-09-01 |
956 |
/nodes/node1.example.com mtime:2007-10-04 |
957 |
</screen> |
958 |
</refsect2> |
959 |
|
960 |
<refsect2> |
961 |
<title>VERIFY</title> |
962 |
|
963 |
<cmdsynopsis> |
964 |
<command>verify</command> |
965 |
<arg choice="opt">--no-nplus1-mem</arg> |
966 |
</cmdsynopsis> |
967 |
|
968 |
<para> |
969 |
Verify correctness of cluster configuration. This is safe with |
970 |
respect to running instances, and incurs no downtime of the |
971 |
instances. |
972 |
</para> |
973 |
|
974 |
<para> |
975 |
If the <option>--no-nplus1-mem</option> option is given, Ganeti won't |
976 |
check whether if it loses a node it can restart all the instances on |
977 |
their secondaries (and report an error otherwise). |
978 |
</para> |
979 |
</refsect2> |
980 |
|
981 |
<refsect2> |
982 |
<title>VERIFY-DISKS</title> |
983 |
|
984 |
<cmdsynopsis> |
985 |
<command>verify-disks</command> |
986 |
</cmdsynopsis> |
987 |
|
988 |
<para> |
989 |
The command checks which instances have degraded DRBD disks |
990 |
and activates the disks of those instances. |
991 |
</para> |
992 |
|
993 |
<para> |
994 |
This command is run from the <command>ganeti-watcher</command> |
995 |
tool, which also has a different, complementary algorithm for |
996 |
doing this check. Together, these two should ensure that DRBD |
997 |
disks are kept consistent. |
998 |
</para> |
999 |
</refsect2> |
1000 |
|
1001 |
<refsect2> |
1002 |
<title>VERSION</title> |
1003 |
|
1004 |
<cmdsynopsis> |
1005 |
<command>version</command> |
1006 |
</cmdsynopsis> |
1007 |
|
1008 |
<para> |
1009 |
Show the cluster version. |
1010 |
</para> |
1011 |
</refsect2> |
1012 |
|
1013 |
</refsect1> |
1014 |
|
1015 |
&footer; |
1016 |
|
1017 |
</refentry> |
1018 |
|
1019 |
<!-- Keep this comment at the end of the file |
1020 |
Local variables: |
1021 |
mode: sgml |
1022 |
sgml-omittag:t |
1023 |
sgml-shorttag:t |
1024 |
sgml-minimize-attributes:nil |
1025 |
sgml-always-quote-attributes:t |
1026 |
sgml-indent-step:2 |
1027 |
sgml-indent-data:t |
1028 |
sgml-parent-document:nil |
1029 |
sgml-default-dtd-file:nil |
1030 |
sgml-exposed-tags:nil |
1031 |
sgml-local-catalogs:nil |
1032 |
sgml-local-ecat-files:nil |
1033 |
End: |
1034 |
--> |