Statistics
| Branch: | Tag: | Revision:

root / man / gnt-cluster.rst @ ae591749

History | View | Annotate | Download (34 kB)

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