Statistics
| Branch: | Tag: | Revision:

root / man / gnt-cluster.rst @ 6204ee71

History | View | Annotate | Download (19.9 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 3cb9e1fe Iustin Pop
ADD-TAGS
24 3cb9e1fe Iustin Pop
~~~~~~~~
25 3cb9e1fe Iustin Pop
26 3cb9e1fe Iustin Pop
**add-tags** [--from *file*] {*tag*...}
27 3cb9e1fe Iustin Pop
28 3cb9e1fe Iustin Pop
Add tags to the cluster. If any of the tags contains invalid
29 3cb9e1fe Iustin Pop
characters, the entire operation will abort.
30 3cb9e1fe Iustin Pop
31 3cb9e1fe Iustin Pop
If the ``--from`` option is given, the list of tags will be
32 3cb9e1fe Iustin Pop
extended with the contents of that file (each line becomes a tag).
33 3cb9e1fe Iustin Pop
In this case, there is not need to pass tags on the command line
34 3cb9e1fe Iustin Pop
(if you do, both sources will be used). A file name of - will be
35 3cb9e1fe Iustin Pop
interpreted as stdin.
36 3cb9e1fe Iustin Pop
37 3cb9e1fe Iustin Pop
COMMAND
38 3cb9e1fe Iustin Pop
~~~~~~~
39 3cb9e1fe Iustin Pop
40 3cb9e1fe Iustin Pop
**command** [-n *node*] {*command*}
41 3cb9e1fe Iustin Pop
42 3cb9e1fe Iustin Pop
Executes a command on all nodes. If the option ``-n`` is not given,
43 3cb9e1fe Iustin Pop
the command will be executed on all nodes, otherwise it will be
44 3cb9e1fe Iustin Pop
executed only on the node(s) specified. Use the option multiple
45 3cb9e1fe Iustin Pop
times for running it on multiple nodes, like::
46 3cb9e1fe Iustin Pop
47 3cb9e1fe Iustin Pop
    # gnt-cluster command -n node1.example.com -n node2.example.com date
48 3cb9e1fe Iustin Pop
49 3cb9e1fe Iustin Pop
The command is executed serially on the selected nodes. If the
50 3cb9e1fe Iustin Pop
master node is present in the list, the command will be executed
51 3cb9e1fe Iustin Pop
last on the master. Regarding the other nodes, the execution order
52 3cb9e1fe Iustin Pop
is somewhat alphabetic, so that node2.example.com will be earlier
53 3cb9e1fe Iustin Pop
than node10.example.com but after node1.example.com.
54 3cb9e1fe Iustin Pop
55 3cb9e1fe Iustin Pop
So given the node names node1, node2, node3, node10, node11, with
56 3cb9e1fe Iustin Pop
node3 being the master, the order will be: node1, node2, node10,
57 3cb9e1fe Iustin Pop
node11, node3.
58 3cb9e1fe Iustin Pop
59 3cb9e1fe Iustin Pop
The command is constructed by concatenating all other command line
60 3cb9e1fe Iustin Pop
arguments. For example, to list the contents of the /etc directory
61 3cb9e1fe Iustin Pop
on all nodes, run::
62 3cb9e1fe Iustin Pop
63 3cb9e1fe Iustin Pop
    # gnt-cluster command ls -l /etc
64 3cb9e1fe Iustin Pop
65 3cb9e1fe Iustin Pop
and the command which will be executed will be ``ls -l /etc``.
66 3cb9e1fe Iustin Pop
67 3cb9e1fe Iustin Pop
COPYFILE
68 3cb9e1fe Iustin Pop
~~~~~~~~
69 3cb9e1fe Iustin Pop
70 3cb9e1fe Iustin Pop
**copyfile** [--use-replication-network] [-n *node*] {*file*}
71 3cb9e1fe Iustin Pop
72 3cb9e1fe Iustin Pop
Copies a file to all or to some nodes. The argument specifies the
73 3cb9e1fe Iustin Pop
source file (on the current system), the ``-n`` argument specifies
74 3cb9e1fe Iustin Pop
the target node, or nodes if the option is given multiple times. If
75 3cb9e1fe Iustin Pop
``-n`` is not given at all, the file will be copied to all nodes.
76 3cb9e1fe Iustin Pop
Passing the ``--use-replication-network`` option will cause the
77 3cb9e1fe Iustin Pop
copy to be done over the replication network (only matters if the
78 3cb9e1fe Iustin Pop
primary/secondary IPs are different). Example::
79 3cb9e1fe Iustin Pop
80 3cb9e1fe Iustin Pop
    # gnt-cluster -n node1.example.com -n node2.example.com copyfile /tmp/test
81 3cb9e1fe Iustin Pop
82 3cb9e1fe Iustin Pop
This will copy the file /tmp/test from the current node to the two
83 3cb9e1fe Iustin Pop
named nodes.
84 3cb9e1fe Iustin Pop
85 3cb9e1fe Iustin Pop
DESTROY
86 3cb9e1fe Iustin Pop
~~~~~~~
87 3cb9e1fe Iustin Pop
88 3cb9e1fe Iustin Pop
**destroy** {--yes-do-it}
89 3cb9e1fe Iustin Pop
90 3cb9e1fe Iustin Pop
Remove all configuration files related to the cluster, so that a
91 3cb9e1fe Iustin Pop
**gnt-cluster init** can be done again afterwards.
92 3cb9e1fe Iustin Pop
93 3cb9e1fe Iustin Pop
Since this is a dangerous command, you are required to pass the
94 3cb9e1fe Iustin Pop
argument *--yes-do-it.*
95 3cb9e1fe Iustin Pop
96 3cb9e1fe Iustin Pop
GETMASTER
97 3cb9e1fe Iustin Pop
~~~~~~~~~
98 3cb9e1fe Iustin Pop
99 3cb9e1fe Iustin Pop
**getmaster**
100 3cb9e1fe Iustin Pop
101 3cb9e1fe Iustin Pop
Displays the current master node.
102 3cb9e1fe Iustin Pop
103 3cb9e1fe Iustin Pop
INFO
104 3cb9e1fe Iustin Pop
~~~~
105 3cb9e1fe Iustin Pop
106 3cb9e1fe Iustin Pop
**info** [--roman]
107 3cb9e1fe Iustin Pop
108 3cb9e1fe Iustin Pop
Shows runtime cluster information: cluster name, architecture (32
109 3cb9e1fe Iustin Pop
or 64 bit), master node, node list and instance list.
110 3cb9e1fe Iustin Pop
111 3cb9e1fe Iustin Pop
Passing the ``--roman`` option gnt-cluster info will try to print
112 3cb9e1fe Iustin Pop
its integer fields in a latin friendly way. This allows further
113 3cb9e1fe Iustin Pop
diffusion of Ganeti among ancient cultures.
114 3cb9e1fe Iustin Pop
115 3cb9e1fe Iustin Pop
INIT
116 3cb9e1fe Iustin Pop
~~~~
117 3cb9e1fe Iustin Pop
118 3cb9e1fe Iustin Pop
| **init**
119 3cb9e1fe Iustin Pop
| [-s *secondary\_ip*]
120 3cb9e1fe Iustin Pop
| [--vg-name *vg-name*]
121 3cb9e1fe Iustin Pop
| [--master-netdev *interface-name*]
122 3cb9e1fe Iustin Pop
| [-m *mac-prefix*]
123 3cb9e1fe Iustin Pop
| [--no-lvm-storage]
124 3cb9e1fe Iustin Pop
| [--no-etc-hosts]
125 3cb9e1fe Iustin Pop
| [--no-ssh-init]
126 3cb9e1fe Iustin Pop
| [--file-storage-dir *dir*]
127 3cb9e1fe Iustin Pop
| [--enabled-hypervisors *hypervisors*]
128 3cb9e1fe Iustin Pop
| [-t *hypervisor name*]
129 3cb9e1fe Iustin Pop
| [--hypervisor-parameters *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
130 3cb9e1fe Iustin Pop
| [--backend-parameters *be-param*=*value* [,*be-param*=*value*...]]
131 3cb9e1fe Iustin Pop
| [--nic-parameters *nic-param*=*value* [,*nic-param*=*value*...]]
132 3cb9e1fe Iustin Pop
| [--maintain-node-health {yes \| no}]
133 3cb9e1fe Iustin Pop
| [--uid-pool *user-id pool definition*]
134 3cb9e1fe Iustin Pop
| [-I *default instance allocator*]
135 3cb9e1fe Iustin Pop
| [--primary-ip-version *version*]
136 3cb9e1fe Iustin Pop
| [--prealloc-wipe-disks {yes \| no}]
137 6204ee71 Renรฉ Nussbaumer
| [--node-parameters *ndparams*]
138 3cb9e1fe Iustin Pop
| {*clustername*}
139 3cb9e1fe Iustin Pop
140 3cb9e1fe Iustin Pop
This commands is only run once initially on the first node of the
141 3cb9e1fe Iustin Pop
cluster. It will initialize the cluster configuration, setup the
142 3cb9e1fe Iustin Pop
ssh-keys, start the daemons on the master node, etc. in order to have
143 3cb9e1fe Iustin Pop
a working one-node cluster.
144 3cb9e1fe Iustin Pop
145 3cb9e1fe Iustin Pop
Note that the *clustername* is not any random name. It has to be
146 3cb9e1fe Iustin Pop
resolvable to an IP address using DNS, and it is best if you give the
147 3cb9e1fe Iustin Pop
fully-qualified domain name. This hostname must resolve to an IP
148 3cb9e1fe Iustin Pop
address reserved exclusively for this purpose, i.e. not already in
149 3cb9e1fe Iustin Pop
use.
150 3cb9e1fe Iustin Pop
151 3cb9e1fe Iustin Pop
The cluster can run in two modes: single-home or dual-homed. In the
152 3cb9e1fe Iustin Pop
first case, all traffic (both public traffic, inter-node traffic
153 3cb9e1fe Iustin Pop
and data replication traffic) goes over the same interface. In the
154 3cb9e1fe Iustin Pop
dual-homed case, the data replication traffic goes over the second
155 3cb9e1fe Iustin Pop
network. The ``-s`` option here marks the cluster as dual-homed and
156 3cb9e1fe Iustin Pop
its parameter represents this node's address on the second network.
157 3cb9e1fe Iustin Pop
If you initialise the cluster with ``-s``, all nodes added must
158 3cb9e1fe Iustin Pop
have a secondary IP as well.
159 3cb9e1fe Iustin Pop
160 3cb9e1fe Iustin Pop
Note that for Ganeti it doesn't matter if the secondary network is
161 3cb9e1fe Iustin Pop
actually a separate physical network, or is done using tunneling,
162 3cb9e1fe Iustin Pop
etc. For performance reasons, it's recommended to use a separate
163 3cb9e1fe Iustin Pop
network, of course.
164 3cb9e1fe Iustin Pop
165 3cb9e1fe Iustin Pop
The ``--vg-name`` option will let you specify a volume group
166 3cb9e1fe Iustin Pop
different than "xenvg" for Ganeti to use when creating instance
167 3cb9e1fe Iustin Pop
disks. This volume group must have the same name on all nodes. Once
168 3cb9e1fe Iustin Pop
the cluster is initialized this can be altered by using the
169 3cb9e1fe Iustin Pop
**modify** command. If you don't want to use lvm storage at all use
170 3cb9e1fe Iustin Pop
the ``--no-lvm-storage`` option. Once the cluster is initialized
171 3cb9e1fe Iustin Pop
you can change this setup with the **modify** command.
172 3cb9e1fe Iustin Pop
173 3cb9e1fe Iustin Pop
The ``--master-netdev`` option is useful for specifying a different
174 3cb9e1fe Iustin Pop
interface on which the master will activate its IP address. It's
175 3cb9e1fe Iustin Pop
important that all nodes have this interface because you'll need it
176 3cb9e1fe Iustin Pop
for a master failover.
177 3cb9e1fe Iustin Pop
178 3cb9e1fe Iustin Pop
The ``-m`` option will let you specify a three byte prefix under
179 3cb9e1fe Iustin Pop
which the virtual MAC addresses of your instances will be
180 3cb9e1fe Iustin Pop
generated. The prefix must be specified in the format XX:XX:XX and
181 3cb9e1fe Iustin Pop
the default is aa:00:00.
182 3cb9e1fe Iustin Pop
183 3cb9e1fe Iustin Pop
The ``--no-lvm-storage`` option allows you to initialize the
184 3cb9e1fe Iustin Pop
cluster without lvm support. This means that only instances using
185 3cb9e1fe Iustin Pop
files as storage backend will be possible to create. Once the
186 3cb9e1fe Iustin Pop
cluster is initialized you can change this setup with the
187 3cb9e1fe Iustin Pop
**modify** command.
188 3cb9e1fe Iustin Pop
189 3cb9e1fe Iustin Pop
The ``--no-etc-hosts`` option allows you to initialize the cluster
190 3cb9e1fe Iustin Pop
without modifying the /etc/hosts file.
191 3cb9e1fe Iustin Pop
192 3cb9e1fe Iustin Pop
The ``--no-ssh-init`` option allows you to initialize the cluster
193 3cb9e1fe Iustin Pop
without creating or distributing SSH key pairs.
194 3cb9e1fe Iustin Pop
195 3cb9e1fe Iustin Pop
The ``--file-storage-dir`` option allows you set the directory to
196 3cb9e1fe Iustin Pop
use for storing the instance disk files when using file storage as
197 3cb9e1fe Iustin Pop
backend for instance disks.
198 3cb9e1fe Iustin Pop
199 3cb9e1fe Iustin Pop
The ``--enabled-hypervisors`` option allows you to set the list of
200 3cb9e1fe Iustin Pop
hypervisors that will be enabled for this cluster. Instance
201 3cb9e1fe Iustin Pop
hypervisors can only be chosen from the list of enabled
202 3cb9e1fe Iustin Pop
hypervisors, and the first entry of this list will be used by
203 3cb9e1fe Iustin Pop
default. Currently, the following hypervisors are available:
204 3cb9e1fe Iustin Pop
205 3cb9e1fe Iustin Pop
The ``--prealloc-wipe-disks`` sets a cluster wide configuration
206 3cb9e1fe Iustin Pop
value for wiping disks prior to allocation. This increases security
207 3cb9e1fe Iustin Pop
on instance level as the instance can't access untouched data from
208 3cb9e1fe Iustin Pop
it's underlying storage.
209 3cb9e1fe Iustin Pop
210 3cb9e1fe Iustin Pop
211 3cb9e1fe Iustin Pop
212 3cb9e1fe Iustin Pop
213 3cb9e1fe Iustin Pop
214 3cb9e1fe Iustin Pop
xen-pvm
215 3cb9e1fe Iustin Pop
    Xen PVM hypervisor
216 3cb9e1fe Iustin Pop
217 3cb9e1fe Iustin Pop
xen-hvm
218 3cb9e1fe Iustin Pop
    Xen HVM hypervisor
219 3cb9e1fe Iustin Pop
220 3cb9e1fe Iustin Pop
kvm
221 3cb9e1fe Iustin Pop
    Linux KVM hypervisor
222 3cb9e1fe Iustin Pop
223 3cb9e1fe Iustin Pop
chroot
224 3cb9e1fe Iustin Pop
    a simple chroot manager that starts chroot based on a script at the
225 3cb9e1fe Iustin Pop
    root of the filesystem holding the chroot
226 3cb9e1fe Iustin Pop
227 3cb9e1fe Iustin Pop
fake
228 3cb9e1fe Iustin Pop
    fake hypervisor for development/testing
229 3cb9e1fe Iustin Pop
230 3cb9e1fe Iustin Pop
231 3cb9e1fe Iustin Pop
Either a single hypervisor name or a comma-separated list of
232 3cb9e1fe Iustin Pop
hypervisor names can be specified. If this option is not specified,
233 3cb9e1fe Iustin Pop
only the xen-pvm hypervisor is enabled by default.
234 3cb9e1fe Iustin Pop
235 3cb9e1fe Iustin Pop
The ``--hypervisor-parameters`` option allows you to set default
236 3cb9e1fe Iustin Pop
hypervisor specific parameters for the cluster. The format of this
237 3cb9e1fe Iustin Pop
option is the name of the hypervisor, followed by a colon and a
238 3cb9e1fe Iustin Pop
comma-separated list of key=value pairs. The keys available for
239 3cb9e1fe Iustin Pop
each hypervisors are detailed in the gnt-instance(8) man page, in
240 3cb9e1fe Iustin Pop
the **add** command plus the following parameters which are only
241 3cb9e1fe Iustin Pop
configurable globally (at cluster level):
242 3cb9e1fe Iustin Pop
243 3cb9e1fe Iustin Pop
migration\_port
244 3cb9e1fe Iustin Pop
    Valid for the Xen PVM and KVM hypervisors.
245 3cb9e1fe Iustin Pop
246 3cb9e1fe Iustin Pop
    This options specifies the TCP port to use for live-migration. For
247 3cb9e1fe Iustin Pop
    Xen, the same port should be configured on all nodes in the
248 3cb9e1fe Iustin Pop
    ``/etc/xen/xend-config.sxp`` file, under the key
249 3cb9e1fe Iustin Pop
    "xend-relocation-port".
250 3cb9e1fe Iustin Pop
251 3cb9e1fe Iustin Pop
migration\_bandwidth
252 3cb9e1fe Iustin Pop
    Valid for the KVM hypervisor.
253 3cb9e1fe Iustin Pop
254 3cb9e1fe Iustin Pop
    This option specifies the maximum bandwidth that KVM will use for
255 3cb9e1fe Iustin Pop
    instance live migrations. The value is in MiB/s.
256 3cb9e1fe Iustin Pop
257 3cb9e1fe Iustin Pop
    This option is only effective with kvm versions >= 78 and qemu-kvm
258 3cb9e1fe Iustin Pop
    versions >= 0.10.0.
259 3cb9e1fe Iustin Pop
260 3cb9e1fe Iustin Pop
261 3cb9e1fe Iustin Pop
The ``--backend-parameters`` option allows you to set the default
262 3cb9e1fe Iustin Pop
backend parameters for the cluster. The parameter format is a
263 3cb9e1fe Iustin Pop
comma-separated list of key=value pairs with the following
264 3cb9e1fe Iustin Pop
supported keys:
265 3cb9e1fe Iustin Pop
266 3cb9e1fe Iustin Pop
vcpus
267 3cb9e1fe Iustin Pop
    Number of VCPUs to set for an instance by default, must be an
268 3cb9e1fe Iustin Pop
    integer, will be set to 1 if no specified.
269 3cb9e1fe Iustin Pop
270 3cb9e1fe Iustin Pop
memory
271 3cb9e1fe Iustin Pop
    Amount of memory to allocate for an instance by default, can be
272 3cb9e1fe Iustin Pop
    either an integer or an integer followed by a unit (M for mebibytes
273 3cb9e1fe Iustin Pop
    and G for gibibytes are supported), will be set to 128M if not
274 3cb9e1fe Iustin Pop
    specified.
275 3cb9e1fe Iustin Pop
276 3cb9e1fe Iustin Pop
auto\_balance
277 3cb9e1fe Iustin Pop
    Value of the auto\_balance flag for instances to use by default,
278 3cb9e1fe Iustin Pop
    will be set to true if not specified.
279 3cb9e1fe Iustin Pop
280 3cb9e1fe Iustin Pop
281 3cb9e1fe Iustin Pop
The ``--nic-parameters`` option allows you to set the default nic
282 3cb9e1fe Iustin Pop
parameters for the cluster. The parameter format is a
283 3cb9e1fe Iustin Pop
comma-separated list of key=value pairs with the following
284 3cb9e1fe Iustin Pop
supported keys:
285 3cb9e1fe Iustin Pop
286 3cb9e1fe Iustin Pop
mode
287 3cb9e1fe Iustin Pop
    The default nic mode, 'routed' or 'bridged'.
288 3cb9e1fe Iustin Pop
289 3cb9e1fe Iustin Pop
link
290 3cb9e1fe Iustin Pop
    In bridged mode the default NIC bridge. In routed mode it
291 3cb9e1fe Iustin Pop
    represents an hypervisor-vif-script dependent value to allow
292 3cb9e1fe Iustin Pop
    different instance groups. For example under the KVM default
293 3cb9e1fe Iustin Pop
    network script it is interpreted as a routing table number or
294 3cb9e1fe Iustin Pop
    name.
295 3cb9e1fe Iustin Pop
296 3cb9e1fe Iustin Pop
297 3cb9e1fe Iustin Pop
The option ``--maintain-node-health`` allows to enable/disable
298 3cb9e1fe Iustin Pop
automatic maintenance actions on nodes. Currently these include
299 3cb9e1fe Iustin Pop
automatic shutdown of instances and deactivation of DRBD devices on
300 3cb9e1fe Iustin Pop
offline nodes; in the future it might be extended to automatic
301 3cb9e1fe Iustin Pop
removal of unknown LVM volumes, etc.
302 3cb9e1fe Iustin Pop
303 3cb9e1fe Iustin Pop
The ``--uid-pool`` option initializes the user-id pool. The
304 3cb9e1fe Iustin Pop
*user-id pool definition* can contain a list of user-ids and/or a
305 3cb9e1fe Iustin Pop
list of user-id ranges. The parameter format is a comma-separated
306 3cb9e1fe Iustin Pop
list of numeric user-ids or user-id ranges. The ranges are defined
307 3cb9e1fe Iustin Pop
by a lower and higher boundary, separated by a dash. The boundaries
308 3cb9e1fe Iustin Pop
are inclusive. If the ``--uid-pool`` option is not supplied, the
309 3cb9e1fe Iustin Pop
user-id pool is initialized to an empty list. An empty list means
310 3cb9e1fe Iustin Pop
that the user-id pool feature is disabled.
311 3cb9e1fe Iustin Pop
312 3cb9e1fe Iustin Pop
The ``-I (--default-iallocator)`` option specifies the default
313 3cb9e1fe Iustin Pop
instance allocator. The instance allocator will be used for
314 3cb9e1fe Iustin Pop
operations like instance creation, instance and node migration,
315 3cb9e1fe Iustin Pop
etc. when no manual override is specified. If this option is not
316 3cb9e1fe Iustin Pop
specified, the default instance allocator will be blank, which
317 3cb9e1fe Iustin Pop
means that relevant operations will require the administrator to
318 3cb9e1fe Iustin Pop
manually specify either an instance allocator, or a set of nodes.
319 3cb9e1fe Iustin Pop
The default iallocator can be changed later using the **modify**
320 3cb9e1fe Iustin Pop
command.
321 3cb9e1fe Iustin Pop
322 3cb9e1fe Iustin Pop
The ``--primary-ip-version`` option specifies the IP version used
323 3cb9e1fe Iustin Pop
for the primary address. Possible values are 4 and 6 for IPv4 and
324 3cb9e1fe Iustin Pop
IPv6, respectively. This option is used when resolving node names
325 3cb9e1fe Iustin Pop
and the cluster name.
326 3cb9e1fe Iustin Pop
327 6204ee71 Renรฉ Nussbaumer
The ``--node-parameters`` option allows you to set default node
328 6204ee71 Renรฉ Nussbaumer
parameters for the cluster. Please see **ganeti**(7) for more
329 6204ee71 Renรฉ Nussbaumer
information about supported key=value pairs.
330 6204ee71 Renรฉ Nussbaumer
331 3cb9e1fe Iustin Pop
LIST-TAGS
332 3cb9e1fe Iustin Pop
~~~~~~~~~
333 3cb9e1fe Iustin Pop
334 3cb9e1fe Iustin Pop
**list-tags**
335 3cb9e1fe Iustin Pop
336 3cb9e1fe Iustin Pop
List the tags of the cluster.
337 3cb9e1fe Iustin Pop
338 3cb9e1fe Iustin Pop
MASTER-FAILOVER
339 3cb9e1fe Iustin Pop
~~~~~~~~~~~~~~~
340 3cb9e1fe Iustin Pop
341 3cb9e1fe Iustin Pop
**master-failover** [--no-voting]
342 3cb9e1fe Iustin Pop
343 3cb9e1fe Iustin Pop
Failover the master role to the current node.
344 3cb9e1fe Iustin Pop
345 3cb9e1fe Iustin Pop
The ``--no-voting`` option skips the remote node agreement checks.
346 3cb9e1fe Iustin Pop
This is dangerous, but necessary in some cases (for example failing
347 3cb9e1fe Iustin Pop
over the master role in a 2 node cluster with the original master
348 3cb9e1fe Iustin Pop
down). If the original master then comes up, it won't be able to
349 3cb9e1fe Iustin Pop
start its master daemon because it won't have enough votes, but so
350 3cb9e1fe Iustin Pop
won't the new master, if the master daemon ever needs a restart.
351 3cb9e1fe Iustin Pop
You can pass ``--no-voting`` to **ganeti-masterd** on the new
352 3cb9e1fe Iustin Pop
master to solve this problem, and run **gnt-cluster redist-conf**
353 3cb9e1fe Iustin Pop
to make sure the cluster is consistent again.
354 3cb9e1fe Iustin Pop
355 3cb9e1fe Iustin Pop
MASTER-PING
356 3cb9e1fe Iustin Pop
~~~~~~~~~~~
357 3cb9e1fe Iustin Pop
358 3cb9e1fe Iustin Pop
**master-ping**
359 3cb9e1fe Iustin Pop
360 3cb9e1fe Iustin Pop
Checks if the master daemon is alive.
361 3cb9e1fe Iustin Pop
362 3cb9e1fe Iustin Pop
If the master daemon is alive and can respond to a basic query (the
363 3cb9e1fe Iustin Pop
equivalent of **gnt-cluster info**), then the exit code of the
364 3cb9e1fe Iustin Pop
command will be 0. If the master daemon is not alive (either due to
365 3cb9e1fe Iustin Pop
a crash or because this is not the master node), the exit code will
366 3cb9e1fe Iustin Pop
be 1.
367 3cb9e1fe Iustin Pop
368 3cb9e1fe Iustin Pop
MODIFY
369 3cb9e1fe Iustin Pop
~~~~~~
370 3cb9e1fe Iustin Pop
371 3cb9e1fe Iustin Pop
| **modify**
372 3cb9e1fe Iustin Pop
| [--vg-name *vg-name*]
373 3cb9e1fe Iustin Pop
| [--no-lvm-storage]
374 3cb9e1fe Iustin Pop
| [--enabled-hypervisors *hypervisors*]
375 3cb9e1fe Iustin Pop
| [--hypervisor-parameters *hypervisor*:*hv-param*=*value*[,*hv-param*=*value*...]]
376 3cb9e1fe Iustin Pop
| [--backend-parameters *be-param*=*value* [,*be-param*=*value*...]]
377 3cb9e1fe Iustin Pop
| [--nic-parameters *nic-param*=*value* [,*nic-param*=*value*...]]
378 3cb9e1fe Iustin Pop
| [--uid-pool *user-id pool definition*]
379 3cb9e1fe Iustin Pop
| [--add-uids *user-id pool definition*]
380 3cb9e1fe Iustin Pop
| [--remove-uids *user-id pool definition*]
381 3cb9e1fe Iustin Pop
| [-C *candidate\_pool\_size*]
382 3cb9e1fe Iustin Pop
| [--maintain-node-health {yes \| no}]
383 3cb9e1fe Iustin Pop
| [--prealloc-wipe-disks {yes \| no}]
384 3cb9e1fe Iustin Pop
| [-I *default instance allocator*]
385 3cb9e1fe Iustin Pop
| [--reserved-lvs=*NAMES*]
386 6204ee71 Renรฉ Nussbaumer
| [--node-parameters *ndparams*]
387 3cb9e1fe Iustin Pop
388 3cb9e1fe Iustin Pop
Modify the options for the cluster.
389 3cb9e1fe Iustin Pop
390 6204ee71 Renรฉ Nussbaumer
The ``--vg-name``, ``--no-lvm-storarge``, ``--enabled-hypervisors``,
391 6204ee71 Renรฉ Nussbaumer
``--hypervisor-parameters``, ``--backend-parameters``,
392 6204ee71 Renรฉ Nussbaumer
``--nic-parameters``, ``--maintain-node-health``,
393 6204ee71 Renรฉ Nussbaumer
``--prealloc-wipe-disks``, ``--uid-pool``, ``--node-parameters`` options
394 6204ee71 Renรฉ Nussbaumer
are described in the **init** command.
395 3cb9e1fe Iustin Pop
396 3cb9e1fe Iustin Pop
The ``-C`` option specifies the ``candidate_pool_size`` cluster
397 3cb9e1fe Iustin Pop
parameter. This is the number of nodes that the master will try to
398 3cb9e1fe Iustin Pop
keep as master\_candidates. For more details about this role and
399 3cb9e1fe Iustin Pop
other node roles, see the ganeti(7). If you increase the size, the
400 3cb9e1fe Iustin Pop
master will automatically promote as many nodes as required and
401 3cb9e1fe Iustin Pop
possible to reach the intended number.
402 3cb9e1fe Iustin Pop
403 3cb9e1fe Iustin Pop
The ``--add-uids`` and ``--remove-uids`` options can be used to
404 3cb9e1fe Iustin Pop
modify the user-id pool by adding/removing a list of user-ids or
405 3cb9e1fe Iustin Pop
user-id ranges.
406 3cb9e1fe Iustin Pop
407 3cb9e1fe Iustin Pop
The option ``--reserved-lvs`` specifies a list (comma-separated) of
408 3cb9e1fe Iustin Pop
logical volume group names (regular expressions) that will be
409 3cb9e1fe Iustin Pop
ignored by the cluster verify operation. This is useful if the
410 3cb9e1fe Iustin Pop
volume group used for Ganeti is shared with the system for other
411 3cb9e1fe Iustin Pop
uses. Note that it's not recommended to create and mark as ignored
412 3cb9e1fe Iustin Pop
logical volume names which match Ganeti's own name format (starting
413 3cb9e1fe Iustin Pop
with UUID and then .diskN), as this option only skips the
414 3cb9e1fe Iustin Pop
verification, but not the actual use of the names given.
415 3cb9e1fe Iustin Pop
416 3cb9e1fe Iustin Pop
To remove all reserved logical volumes, pass in an empty argument
417 3cb9e1fe Iustin Pop
to the option, as in ``--reserved-lvs=`` or ``--reserved-lvs ''``.
418 3cb9e1fe Iustin Pop
419 3cb9e1fe Iustin Pop
The ``-I`` is described in the **init** command. To clear the
420 3cb9e1fe Iustin Pop
default iallocator, just pass an empty string ('').
421 3cb9e1fe Iustin Pop
422 3cb9e1fe Iustin Pop
QUEUE
423 3cb9e1fe Iustin Pop
~~~~~
424 3cb9e1fe Iustin Pop
425 3cb9e1fe Iustin Pop
**queue** {drain | undrain | info}
426 3cb9e1fe Iustin Pop
427 3cb9e1fe Iustin Pop
Change job queue properties.
428 3cb9e1fe Iustin Pop
429 3cb9e1fe Iustin Pop
The ``drain`` option sets the drain flag on the job queue. No new
430 3cb9e1fe Iustin Pop
jobs will be accepted, but jobs already in the queue will be
431 3cb9e1fe Iustin Pop
processed.
432 3cb9e1fe Iustin Pop
433 3cb9e1fe Iustin Pop
The ``undrain`` will unset the drain flag on the job queue. New
434 3cb9e1fe Iustin Pop
jobs will be accepted.
435 3cb9e1fe Iustin Pop
436 3cb9e1fe Iustin Pop
The ``info`` option shows the properties of the job queue.
437 3cb9e1fe Iustin Pop
438 3cb9e1fe Iustin Pop
WATCHER
439 3cb9e1fe Iustin Pop
~~~~~~~
440 3cb9e1fe Iustin Pop
441 3cb9e1fe Iustin Pop
**watcher** {pause *duration* | continue | info}
442 3cb9e1fe Iustin Pop
443 3cb9e1fe Iustin Pop
Make the watcher pause or let it continue.
444 3cb9e1fe Iustin Pop
445 3cb9e1fe Iustin Pop
The ``pause`` option causes the watcher to pause for *duration*
446 3cb9e1fe Iustin Pop
seconds.
447 3cb9e1fe Iustin Pop
448 3cb9e1fe Iustin Pop
The ``continue`` option will let the watcher continue.
449 3cb9e1fe Iustin Pop
450 3cb9e1fe Iustin Pop
The ``info`` option shows whether the watcher is currently paused.
451 3cb9e1fe Iustin Pop
452 3cb9e1fe Iustin Pop
redist-conf
453 3cb9e1fe Iustin Pop
~~~~~~~~~~~
454 3cb9e1fe Iustin Pop
455 3cb9e1fe Iustin Pop
**redist-conf** [--submit]
456 3cb9e1fe Iustin Pop
457 3cb9e1fe Iustin Pop
This command forces a full push of configuration files from the
458 3cb9e1fe Iustin Pop
master node to the other nodes in the cluster. This is normally not
459 3cb9e1fe Iustin Pop
needed, but can be run if the **verify** complains about
460 3cb9e1fe Iustin Pop
configuration mismatches.
461 3cb9e1fe Iustin Pop
462 3cb9e1fe Iustin Pop
The ``--submit`` option is used to send the job to the master
463 3cb9e1fe Iustin Pop
daemon but not wait for its completion. The job ID will be shown so
464 3cb9e1fe Iustin Pop
that it can be examined via **gnt-job info**.
465 3cb9e1fe Iustin Pop
466 3cb9e1fe Iustin Pop
REMOVE-TAGS
467 3cb9e1fe Iustin Pop
~~~~~~~~~~~
468 3cb9e1fe Iustin Pop
469 3cb9e1fe Iustin Pop
**remove-tags** [--from *file*] {*tag*...}
470 3cb9e1fe Iustin Pop
471 3cb9e1fe Iustin Pop
Remove tags from the cluster. If any of the tags are not existing
472 3cb9e1fe Iustin Pop
on the cluster, the entire operation will abort.
473 3cb9e1fe Iustin Pop
474 3cb9e1fe Iustin Pop
If the ``--from`` option is given, the list of tags to be removed will
475 3cb9e1fe Iustin Pop
be extended with the contents of that file (each line becomes a tag).
476 3cb9e1fe Iustin Pop
In this case, there is not need to pass tags on the command line (if
477 3cb9e1fe Iustin Pop
you do, tags from both sources will be removed). A file name of - will
478 3cb9e1fe Iustin Pop
be interpreted as stdin.
479 3cb9e1fe Iustin Pop
480 3cb9e1fe Iustin Pop
RENAME
481 3cb9e1fe Iustin Pop
~~~~~~
482 3cb9e1fe Iustin Pop
483 3cb9e1fe Iustin Pop
**rename** [-f] {*name*}
484 3cb9e1fe Iustin Pop
485 3cb9e1fe Iustin Pop
Renames the cluster and in the process updates the master IP
486 3cb9e1fe Iustin Pop
address to the one the new name resolves to. At least one of either
487 3cb9e1fe Iustin Pop
the name or the IP address must be different, otherwise the
488 3cb9e1fe Iustin Pop
operation will be aborted.
489 3cb9e1fe Iustin Pop
490 3cb9e1fe Iustin Pop
Note that since this command can be dangerous (especially when run
491 3cb9e1fe Iustin Pop
over SSH), the command will require confirmation unless run with
492 3cb9e1fe Iustin Pop
the ``-f`` option.
493 3cb9e1fe Iustin Pop
494 3cb9e1fe Iustin Pop
RENEW-CRYPTO
495 3cb9e1fe Iustin Pop
~~~~~~~~~~~~
496 3cb9e1fe Iustin Pop
497 3cb9e1fe Iustin Pop
| **renew-crypto** [-f]
498 3cb9e1fe Iustin Pop
| [--new-cluster-certificate] [--new-confd-hmac-key]
499 3cb9e1fe Iustin Pop
| [--new-rapi-certificate] [--rapi-certificate *rapi-cert*]
500 3cb9e1fe Iustin Pop
| [--new-cluster-domain-secret] [--cluster-domain-secret *filename*]
501 3cb9e1fe Iustin Pop
502 3cb9e1fe Iustin Pop
This command will stop all Ganeti daemons in the cluster and start
503 3cb9e1fe Iustin Pop
them again once the new certificates and keys are replicated. The
504 3cb9e1fe Iustin Pop
options ``--new-cluster-certificate`` and ``--new-confd-hmac-key``
505 3cb9e1fe Iustin Pop
can be used to regenerate the cluster-internal SSL certificate
506 3cb9e1fe Iustin Pop
respective the HMAC key used by ganeti-confd(8).
507 3cb9e1fe Iustin Pop
508 3cb9e1fe Iustin Pop
To generate a new self-signed RAPI certificate (used by
509 3cb9e1fe Iustin Pop
ganeti-rapi(8)) specify ``--new-rapi-certificate``. If you want to
510 3cb9e1fe Iustin Pop
use your own certificate, e.g. one signed by a certificate
511 3cb9e1fe Iustin Pop
authority (CA), pass its filename to ``--rapi-certificate``.
512 3cb9e1fe Iustin Pop
513 3cb9e1fe Iustin Pop
``--new-cluster-domain-secret`` generates a new, random cluster
514 3cb9e1fe Iustin Pop
domain secret. ``--cluster-domain-secret`` reads the secret from a
515 3cb9e1fe Iustin Pop
file. The cluster domain secret is used to sign information
516 3cb9e1fe Iustin Pop
exchanged between separate clusters via a third party.
517 3cb9e1fe Iustin Pop
518 3cb9e1fe Iustin Pop
REPAIR-DISK-SIZES
519 3cb9e1fe Iustin Pop
~~~~~~~~~~~~~~~~~
520 3cb9e1fe Iustin Pop
521 3cb9e1fe Iustin Pop
**repair-disk-sizes** [instance...]
522 3cb9e1fe Iustin Pop
523 3cb9e1fe Iustin Pop
This command checks that the recorded size of the given instance's
524 3cb9e1fe Iustin Pop
disks matches the actual size and updates any mismatches found.
525 3cb9e1fe Iustin Pop
This is needed if the Ganeti configuration is no longer consistent
526 3cb9e1fe Iustin Pop
with reality, as it will impact some disk operations. If no
527 3cb9e1fe Iustin Pop
arguments are given, all instances will be checked.
528 3cb9e1fe Iustin Pop
529 3cb9e1fe Iustin Pop
Note that only active disks can be checked by this command; in case
530 3cb9e1fe Iustin Pop
a disk cannot be activated it's advised to use
531 3cb9e1fe Iustin Pop
**gnt-instance activate-disks --ignore-size ...** to force
532 3cb9e1fe Iustin Pop
activation without regard to the current size.
533 3cb9e1fe Iustin Pop
534 3cb9e1fe Iustin Pop
When the all disk sizes are consistent, the command will return no
535 3cb9e1fe Iustin Pop
output. Otherwise it will log details about the inconsistencies in
536 3cb9e1fe Iustin Pop
the configuration.
537 3cb9e1fe Iustin Pop
538 3cb9e1fe Iustin Pop
SEARCH-TAGS
539 3cb9e1fe Iustin Pop
~~~~~~~~~~~
540 3cb9e1fe Iustin Pop
541 3cb9e1fe Iustin Pop
**search-tags** {*pattern*}
542 3cb9e1fe Iustin Pop
543 3cb9e1fe Iustin Pop
Searches the tags on all objects in the cluster (the cluster
544 3cb9e1fe Iustin Pop
itself, the nodes and the instances) for a given pattern. The
545 3cb9e1fe Iustin Pop
pattern is interpreted as a regular expression and a search will be
546 3cb9e1fe Iustin Pop
done on it (i.e. the given pattern is not anchored to the beggining
547 3cb9e1fe Iustin Pop
of the string; if you want that, prefix the pattern with ^).
548 3cb9e1fe Iustin Pop
549 3cb9e1fe Iustin Pop
If no tags are matching the pattern, the exit code of the command
550 3cb9e1fe Iustin Pop
will be one. If there is at least one match, the exit code will be
551 3cb9e1fe Iustin Pop
zero. Each match is listed on one line, the object and the tag
552 3cb9e1fe Iustin Pop
separated by a space. The cluster will be listed as /cluster, a
553 3cb9e1fe Iustin Pop
node will be listed as /nodes/*name*, and an instance as
554 3cb9e1fe Iustin Pop
/instances/*name*. Example:
555 3cb9e1fe Iustin Pop
556 3cb9e1fe Iustin Pop
::
557 3cb9e1fe Iustin Pop
558 3cb9e1fe Iustin Pop
    # gnt-cluster search-tags time
559 3cb9e1fe Iustin Pop
    /cluster ctime:2007-09-01
560 3cb9e1fe Iustin Pop
    /nodes/node1.example.com mtime:2007-10-04
561 3cb9e1fe Iustin Pop
562 3cb9e1fe Iustin Pop
VERIFY
563 3cb9e1fe Iustin Pop
~~~~~~
564 3cb9e1fe Iustin Pop
565 3cb9e1fe Iustin Pop
**verify** [--no-nplus1-mem]
566 3cb9e1fe Iustin Pop
567 3cb9e1fe Iustin Pop
Verify correctness of cluster configuration. This is safe with
568 3cb9e1fe Iustin Pop
respect to running instances, and incurs no downtime of the
569 3cb9e1fe Iustin Pop
instances.
570 3cb9e1fe Iustin Pop
571 3cb9e1fe Iustin Pop
If the ``--no-nplus1-mem`` option is given, Ganeti won't check
572 3cb9e1fe Iustin Pop
whether if it loses a node it can restart all the instances on
573 3cb9e1fe Iustin Pop
their secondaries (and report an error otherwise).
574 3cb9e1fe Iustin Pop
575 3cb9e1fe Iustin Pop
VERIFY-DISKS
576 3cb9e1fe Iustin Pop
~~~~~~~~~~~~
577 3cb9e1fe Iustin Pop
578 3cb9e1fe Iustin Pop
**verify-disks**
579 3cb9e1fe Iustin Pop
580 3cb9e1fe Iustin Pop
The command checks which instances have degraded DRBD disks and
581 3cb9e1fe Iustin Pop
activates the disks of those instances.
582 3cb9e1fe Iustin Pop
583 3cb9e1fe Iustin Pop
This command is run from the **ganeti-watcher** tool, which also
584 3cb9e1fe Iustin Pop
has a different, complementary algorithm for doing this check.
585 3cb9e1fe Iustin Pop
Together, these two should ensure that DRBD disks are kept
586 3cb9e1fe Iustin Pop
consistent.
587 3cb9e1fe Iustin Pop
588 3cb9e1fe Iustin Pop
VERSION
589 3cb9e1fe Iustin Pop
~~~~~~~
590 3cb9e1fe Iustin Pop
591 3cb9e1fe Iustin Pop
**version**
592 3cb9e1fe Iustin Pop
593 3cb9e1fe Iustin Pop
Show the cluster version.