Statistics
| Branch: | Tag: | Revision:

root / doc / admin.rst @ ebbdde89

History | View | Annotate | Download (73 kB)

1 ffa6869f Iustin Pop
Ganeti administrator's guide
2 ffa6869f Iustin Pop
============================
3 ffa6869f Iustin Pop
4 fd07c6b3 Iustin Pop
Documents Ganeti version |version|
5 ffa6869f Iustin Pop
6 ffa6869f Iustin Pop
.. contents::
7 ffa6869f Iustin Pop
8 73225861 Iustin Pop
.. highlight:: shell-example
9 c71a1a3d Iustin Pop
10 ffa6869f Iustin Pop
Introduction
11 ffa6869f Iustin Pop
------------
12 ffa6869f Iustin Pop
13 c71a1a3d Iustin Pop
Ganeti is a virtualization cluster management software. You are expected
14 c71a1a3d Iustin Pop
to be a system administrator familiar with your Linux distribution and
15 c71a1a3d Iustin Pop
the Xen or KVM virtualization environments before using it.
16 ffa6869f Iustin Pop
17 ffa6869f Iustin Pop
The various components of Ganeti all have man pages and interactive
18 c71a1a3d Iustin Pop
help. This manual though will help you getting familiar with the system
19 c71a1a3d Iustin Pop
by explaining the most common operations, grouped by related use.
20 ffa6869f Iustin Pop
21 ffa6869f Iustin Pop
After a terminology glossary and a section on the prerequisites needed
22 c71a1a3d Iustin Pop
to use this manual, the rest of this document is divided in sections
23 c71a1a3d Iustin Pop
for the different targets that a command affects: instance, nodes, etc.
24 ffa6869f Iustin Pop
25 c71a1a3d Iustin Pop
.. _terminology-label:
26 ffa6869f Iustin Pop
27 ffa6869f Iustin Pop
Ganeti terminology
28 c71a1a3d Iustin Pop
++++++++++++++++++
29 ffa6869f Iustin Pop
30 c71a1a3d Iustin Pop
This section provides a small introduction to Ganeti terminology, which
31 c71a1a3d Iustin Pop
might be useful when reading the rest of the document.
32 ffa6869f Iustin Pop
33 ffa6869f Iustin Pop
Cluster
34 c71a1a3d Iustin Pop
~~~~~~~
35 ffa6869f Iustin Pop
36 c71a1a3d Iustin Pop
A set of machines (nodes) that cooperate to offer a coherent, highly
37 c71a1a3d Iustin Pop
available virtualization service under a single administration domain.
38 ffa6869f Iustin Pop
39 c71a1a3d Iustin Pop
Node
40 c71a1a3d Iustin Pop
~~~~
41 c71a1a3d Iustin Pop
42 c71a1a3d Iustin Pop
A physical machine which is member of a cluster.  Nodes are the basic
43 c71a1a3d Iustin Pop
cluster infrastructure, and they don't need to be fault tolerant in
44 c71a1a3d Iustin Pop
order to achieve high availability for instances.
45 c71a1a3d Iustin Pop
46 c71a1a3d Iustin Pop
Node can be added and removed (if they host no instances) at will from
47 c71a1a3d Iustin Pop
the cluster. In a HA cluster and only with HA instances, the loss of any
48 c71a1a3d Iustin Pop
single node will not cause disk data loss for any instance; of course,
49 7e2f08ba Helga Velroyen
a node crash will cause the crash of its primary instances.
50 c71a1a3d Iustin Pop
51 c71a1a3d Iustin Pop
A node belonging to a cluster can be in one of the following roles at a
52 c71a1a3d Iustin Pop
given time:
53 c71a1a3d Iustin Pop
54 c71a1a3d Iustin Pop
- *master* node, which is the node from which the cluster is controlled
55 c71a1a3d Iustin Pop
- *master candidate* node, only nodes in this role have the full cluster
56 c71a1a3d Iustin Pop
  configuration and knowledge, and only master candidates can become the
57 c71a1a3d Iustin Pop
  master node
58 c71a1a3d Iustin Pop
- *regular* node, which is the state in which most nodes will be on
59 c71a1a3d Iustin Pop
  bigger clusters (>20 nodes)
60 c71a1a3d Iustin Pop
- *drained* node, nodes in this state are functioning normally but the
61 c71a1a3d Iustin Pop
  cannot receive new instances; the intention is that nodes in this role
62 c71a1a3d Iustin Pop
  have some issue and they are being evacuated for hardware repairs
63 c71a1a3d Iustin Pop
- *offline* node, in which there is a record in the cluster
64 c71a1a3d Iustin Pop
  configuration about the node, but the daemons on the master node will
65 c71a1a3d Iustin Pop
  not talk to this node; any instances declared as having an offline
66 c71a1a3d Iustin Pop
  node as either primary or secondary will be flagged as an error in the
67 c71a1a3d Iustin Pop
  cluster verify operation
68 c71a1a3d Iustin Pop
69 c71a1a3d Iustin Pop
Depending on the role, each node will run a set of daemons:
70 c71a1a3d Iustin Pop
71 5e360222 Michele Tartara
- the :command:`ganeti-noded` daemon, which controls the manipulation of
72 c71a1a3d Iustin Pop
  this node's hardware resources; it runs on all nodes which are in a
73 c71a1a3d Iustin Pop
  cluster
74 c71a1a3d Iustin Pop
- the :command:`ganeti-confd` daemon (Ganeti 2.1+) which runs on all
75 10d3f678 Iustin Pop
  nodes, but is only functional on master candidate nodes; this daemon
76 10d3f678 Iustin Pop
  can be disabled at configuration time if you don't need its
77 10d3f678 Iustin Pop
  functionality
78 c71a1a3d Iustin Pop
- the :command:`ganeti-rapi` daemon which runs on the master node and
79 c71a1a3d Iustin Pop
  offers an HTTP-based API for the cluster
80 c71a1a3d Iustin Pop
- the :command:`ganeti-masterd` daemon which runs on the master node and
81 c71a1a3d Iustin Pop
  allows control of the cluster
82 ffa6869f Iustin Pop
83 feec31d1 Iustin Pop
Beside the node role, there are other node flags that influence its
84 feec31d1 Iustin Pop
behaviour:
85 feec31d1 Iustin Pop
86 feec31d1 Iustin Pop
- the *master_capable* flag denotes whether the node can ever become a
87 feec31d1 Iustin Pop
  master candidate; setting this to 'no' means that auto-promotion will
88 feec31d1 Iustin Pop
  never make this node a master candidate; this flag can be useful for a
89 feec31d1 Iustin Pop
  remote node that only runs local instances, and having it become a
90 feec31d1 Iustin Pop
  master is impractical due to networking or other constraints
91 feec31d1 Iustin Pop
- the *vm_capable* flag denotes whether the node can host instances or
92 feec31d1 Iustin Pop
  not; for example, one might use a non-vm_capable node just as a master
93 feec31d1 Iustin Pop
  candidate, for configuration backups; setting this flag to no
94 feec31d1 Iustin Pop
  disallows placement of instances of this node, deactivates hypervisor
95 feec31d1 Iustin Pop
  and related checks on it (e.g. bridge checks, LVM check, etc.), and
96 feec31d1 Iustin Pop
  removes it from cluster capacity computations
97 feec31d1 Iustin Pop
98 feec31d1 Iustin Pop
99 ffa6869f Iustin Pop
Instance
100 c71a1a3d Iustin Pop
~~~~~~~~
101 ffa6869f Iustin Pop
102 c71a1a3d Iustin Pop
A virtual machine which runs on a cluster. It can be a fault tolerant,
103 c71a1a3d Iustin Pop
highly available entity.
104 ffa6869f Iustin Pop
105 c71a1a3d Iustin Pop
An instance has various parameters, which are classified in three
106 c71a1a3d Iustin Pop
categories: hypervisor related-parameters (called ``hvparams``), general
107 c71a1a3d Iustin Pop
parameters (called ``beparams``) and per network-card parameters (called
108 c71a1a3d Iustin Pop
``nicparams``). All these parameters can be modified either at instance
109 c71a1a3d Iustin Pop
level or via defaults at cluster level.
110 ffa6869f Iustin Pop
111 c71a1a3d Iustin Pop
Disk template
112 ffa6869f Iustin Pop
~~~~~~~~~~~~~
113 ffa6869f Iustin Pop
114 c71a1a3d Iustin Pop
The are multiple options for the storage provided to an instance; while
115 c71a1a3d Iustin Pop
the instance sees the same virtual drive in all cases, the node-level
116 c71a1a3d Iustin Pop
configuration varies between them.
117 ffa6869f Iustin Pop
118 7ed400f0 Stratos Psomadakis
There are five disk templates you can choose from:
119 ffa6869f Iustin Pop
120 c71a1a3d Iustin Pop
diskless
121 c71a1a3d Iustin Pop
  The instance has no disks. Only used for special purpose operating
122 c71a1a3d Iustin Pop
  systems or for testing.
123 c71a1a3d Iustin Pop
124 c71a1a3d Iustin Pop
file
125 c71a1a3d Iustin Pop
  The instance will use plain files as backend for its disks. No
126 c71a1a3d Iustin Pop
  redundancy is provided, and this is somewhat more difficult to
127 da535d0d Guido Trotter
  configure for high performance. Note that for security reasons the
128 da535d0d Guido Trotter
  file storage directory must be listed under
129 da535d0d Guido Trotter
  ``/etc/ganeti/file-storage-paths``, and that file is not copied
130 e34f46e6 Thomas Thrainer
  automatically to all nodes by Ganeti. The format of that file is a
131 e34f46e6 Thomas Thrainer
  newline-separated list of directories.
132 da535d0d Guido Trotter
133 da535d0d Guido Trotter
sharedfile
134 da535d0d Guido Trotter
  The instance will use plain files as backend, but Ganeti assumes that
135 da535d0d Guido Trotter
  those files will be available and in sync automatically on all nodes.
136 da535d0d Guido Trotter
  This allows live migration and failover of instances using this
137 da535d0d Guido Trotter
  method. As for ``file`` the file storage directory must be listed under
138 da535d0d Guido Trotter
  ``/etc/ganeti/file-storage-paths`` or ganeti will refuse to create
139 da535d0d Guido Trotter
  instances under it.
140 c71a1a3d Iustin Pop
141 c71a1a3d Iustin Pop
plain
142 c71a1a3d Iustin Pop
  The instance will use LVM devices as backend for its disks. No
143 c71a1a3d Iustin Pop
  redundancy is provided.
144 c71a1a3d Iustin Pop
145 c71a1a3d Iustin Pop
drbd
146 c71a1a3d Iustin Pop
  .. note:: This is only valid for multi-node clusters using DRBD 8.0+
147 c71a1a3d Iustin Pop
148 c71a1a3d Iustin Pop
  A mirror is set between the local node and a remote one, which must be
149 c71a1a3d Iustin Pop
  specified with the second value of the --node option. Use this option
150 c71a1a3d Iustin Pop
  to obtain a highly available instance that can be failed over to a
151 c71a1a3d Iustin Pop
  remote node should the primary one fail.
152 c71a1a3d Iustin Pop
153 24ccfd74 Johan Euphrosine
  .. note:: Ganeti does not support DRBD stacked devices:
154 24ccfd74 Johan Euphrosine
     DRBD stacked setup is not fully symmetric and as such it is
155 24ccfd74 Johan Euphrosine
     not working with live migration.
156 24ccfd74 Johan Euphrosine
157 7ed400f0 Stratos Psomadakis
rbd
158 7ed400f0 Stratos Psomadakis
  The instance will use Volumes inside a RADOS cluster as backend for its
159 7ed400f0 Stratos Psomadakis
  disks. It will access them using the RADOS block device (RBD).
160 7ed400f0 Stratos Psomadakis
161 da535d0d Guido Trotter
ext
162 da535d0d Guido Trotter
  The instance will use an external storage provider. See
163 da535d0d Guido Trotter
  :manpage:`ganeti-extstorage-interface(7)` for how to implement one.
164 da535d0d Guido Trotter
165 da535d0d Guido Trotter
166 c71a1a3d Iustin Pop
IAllocator
167 c71a1a3d Iustin Pop
~~~~~~~~~~
168 c71a1a3d Iustin Pop
169 c71a1a3d Iustin Pop
A framework for using external (user-provided) scripts to compute the
170 c71a1a3d Iustin Pop
placement of instances on the cluster nodes. This eliminates the need to
171 c71a1a3d Iustin Pop
manually specify nodes in instance add, instance moves, node evacuate,
172 c71a1a3d Iustin Pop
etc.
173 c71a1a3d Iustin Pop
174 c71a1a3d Iustin Pop
In order for Ganeti to be able to use these scripts, they must be place
175 c71a1a3d Iustin Pop
in the iallocator directory (usually ``lib/ganeti/iallocators`` under
176 c71a1a3d Iustin Pop
the installation prefix, e.g. ``/usr/local``).
177 c71a1a3d Iustin Pop
178 c71a1a3d Iustin Pop
“Primary” and “secondary” concepts
179 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180 c71a1a3d Iustin Pop
181 c71a1a3d Iustin Pop
An instance has a primary and depending on the disk configuration, might
182 c71a1a3d Iustin Pop
also have a secondary node. The instance always runs on the primary node
183 c71a1a3d Iustin Pop
and only uses its secondary node for disk replication.
184 c71a1a3d Iustin Pop
185 c71a1a3d Iustin Pop
Similarly, the term of primary and secondary instances when talking
186 c71a1a3d Iustin Pop
about a node refers to the set of instances having the given node as
187 c71a1a3d Iustin Pop
primary, respectively secondary.
188 c71a1a3d Iustin Pop
189 c71a1a3d Iustin Pop
Tags
190 c71a1a3d Iustin Pop
~~~~
191 c71a1a3d Iustin Pop
192 c71a1a3d Iustin Pop
Tags are short strings that can be attached to either to cluster itself,
193 c71a1a3d Iustin Pop
or to nodes or instances. They are useful as a very simplistic
194 c71a1a3d Iustin Pop
information store for helping with cluster administration, for example
195 c71a1a3d Iustin Pop
by attaching owner information to each instance after it's created::
196 ffa6869f Iustin Pop
197 73225861 Iustin Pop
  $ gnt-instance add … %instance1%
198 73225861 Iustin Pop
  $ gnt-instance add-tags %instance1% %owner:user2%
199 c71a1a3d Iustin Pop
200 c71a1a3d Iustin Pop
And then by listing each instance and its tags, this information could
201 c71a1a3d Iustin Pop
be used for contacting the users of each instance.
202 c71a1a3d Iustin Pop
203 c71a1a3d Iustin Pop
Jobs and OpCodes
204 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~
205 c71a1a3d Iustin Pop
206 c71a1a3d Iustin Pop
While not directly visible by an end-user, it's useful to know that a
207 c71a1a3d Iustin Pop
basic cluster operation (e.g. starting an instance) is represented
208 73225861 Iustin Pop
internally by Ganeti as an *OpCode* (abbreviation from operation
209 c71a1a3d Iustin Pop
code). These OpCodes are executed as part of a *Job*. The OpCodes in a
210 c71a1a3d Iustin Pop
single Job are processed serially by Ganeti, but different Jobs will be
211 f313e7be Michael Hanselmann
processed (depending on resource availability) in parallel. They will
212 f313e7be Michael Hanselmann
not be executed in the submission order, but depending on resource
213 f313e7be Michael Hanselmann
availability, locks and (starting with Ganeti 2.3) priority. An earlier
214 f313e7be Michael Hanselmann
job may have to wait for a lock while a newer job doesn't need any locks
215 f313e7be Michael Hanselmann
and can be executed right away. Operations requiring a certain order
216 f313e7be Michael Hanselmann
need to be submitted as a single job, or the client must submit one job
217 f313e7be Michael Hanselmann
at a time and wait for it to finish before continuing.
218 c71a1a3d Iustin Pop
219 c71a1a3d Iustin Pop
For example, shutting down the entire cluster can be done by running the
220 c71a1a3d Iustin Pop
command ``gnt-instance shutdown --all``, which will submit for each
221 c71a1a3d Iustin Pop
instance a separate job containing the “shutdown instance” OpCode.
222 c71a1a3d Iustin Pop
223 c71a1a3d Iustin Pop
224 c71a1a3d Iustin Pop
Prerequisites
225 c71a1a3d Iustin Pop
+++++++++++++
226 c71a1a3d Iustin Pop
227 c71a1a3d Iustin Pop
You need to have your Ganeti cluster installed and configured before you
228 c71a1a3d Iustin Pop
try any of the commands in this document. Please follow the
229 c71a1a3d Iustin Pop
:doc:`install` for instructions on how to do that.
230 c71a1a3d Iustin Pop
231 c71a1a3d Iustin Pop
Instance management
232 c71a1a3d Iustin Pop
-------------------
233 c71a1a3d Iustin Pop
234 c71a1a3d Iustin Pop
Adding an instance
235 c71a1a3d Iustin Pop
++++++++++++++++++
236 c71a1a3d Iustin Pop
237 c71a1a3d Iustin Pop
The add operation might seem complex due to the many parameters it
238 c71a1a3d Iustin Pop
accepts, but once you have understood the (few) required parameters and
239 c71a1a3d Iustin Pop
the customisation capabilities you will see it is an easy operation.
240 c71a1a3d Iustin Pop
241 c71a1a3d Iustin Pop
The add operation requires at minimum five parameters:
242 c71a1a3d Iustin Pop
243 c71a1a3d Iustin Pop
- the OS for the instance
244 c71a1a3d Iustin Pop
- the disk template
245 c71a1a3d Iustin Pop
- the disk count and size
246 c71a1a3d Iustin Pop
- the node specification or alternatively the iallocator to use
247 c71a1a3d Iustin Pop
- and finally the instance name
248 c71a1a3d Iustin Pop
249 c71a1a3d Iustin Pop
The OS for the instance must be visible in the output of the command
250 c71a1a3d Iustin Pop
``gnt-os list`` and specifies which guest OS to install on the instance.
251 c71a1a3d Iustin Pop
252 c71a1a3d Iustin Pop
The disk template specifies what kind of storage to use as backend for
253 c71a1a3d Iustin Pop
the (virtual) disks presented to the instance; note that for instances
254 c71a1a3d Iustin Pop
with multiple virtual disks, they all must be of the same type.
255 c71a1a3d Iustin Pop
256 c71a1a3d Iustin Pop
The node(s) on which the instance will run can be given either manually,
257 c71a1a3d Iustin Pop
via the ``-n`` option, or computed automatically by Ganeti, if you have
258 c71a1a3d Iustin Pop
installed any iallocator script.
259 c71a1a3d Iustin Pop
260 c71a1a3d Iustin Pop
With the above parameters in mind, the command is::
261 ffa6869f Iustin Pop
262 73225861 Iustin Pop
  $ gnt-instance add \
263 73225861 Iustin Pop
    -n %TARGET_NODE%:%SECONDARY_NODE% \
264 73225861 Iustin Pop
    -o %OS_TYPE% \
265 73225861 Iustin Pop
    -t %DISK_TEMPLATE% -s %DISK_SIZE% \
266 73225861 Iustin Pop
    %INSTANCE_NAME%
267 ffa6869f Iustin Pop
268 ffa6869f Iustin Pop
The instance name must be resolvable (e.g. exist in DNS) and usually
269 c71a1a3d Iustin Pop
points to an address in the same subnet as the cluster itself.
270 ffa6869f Iustin Pop
271 c71a1a3d Iustin Pop
The above command has the minimum required options; other options you
272 c71a1a3d Iustin Pop
can give include, among others:
273 ffa6869f Iustin Pop
274 d4fcd298 Guido Trotter
- The maximum/minimum memory size (``-B maxmem``, ``-B minmem``)
275 d4fcd298 Guido Trotter
  (``-B memory`` can be used to specify only one size)
276 ffa6869f Iustin Pop
277 ffa6869f Iustin Pop
- The number of virtual CPUs (``-B vcpus``)
278 ffa6869f Iustin Pop
279 ffa6869f Iustin Pop
- Arguments for the NICs of the instance; by default, a single-NIC
280 ffa6869f Iustin Pop
  instance is created. The IP and/or bridge of the NIC can be changed
281 0da22bc3 Sebastian Gebhard
  via ``--net 0:ip=IP,link=BRIDGE``
282 ffa6869f Iustin Pop
283 da535d0d Guido Trotter
See :manpage:`ganeti-instance(8)` for the detailed option list.
284 ffa6869f Iustin Pop
285 c71a1a3d Iustin Pop
For example if you want to create an highly available instance, with a
286 c71a1a3d Iustin Pop
single disk of 50GB and the default memory size, having primary node
287 c71a1a3d Iustin Pop
``node1`` and secondary node ``node3``, use the following command::
288 ffa6869f Iustin Pop
289 73225861 Iustin Pop
  $ gnt-instance add -n node1:node3 -o debootstrap -t drbd -s 50G \
290 c71a1a3d Iustin Pop
    instance1
291 ffa6869f Iustin Pop
292 c71a1a3d Iustin Pop
There is a also a command for batch instance creation from a
293 c71a1a3d Iustin Pop
specification file, see the ``batch-create`` operation in the
294 c71a1a3d Iustin Pop
gnt-instance manual page.
295 ffa6869f Iustin Pop
296 c71a1a3d Iustin Pop
Regular instance operations
297 c71a1a3d Iustin Pop
+++++++++++++++++++++++++++
298 ffa6869f Iustin Pop
299 c71a1a3d Iustin Pop
Removal
300 c71a1a3d Iustin Pop
~~~~~~~
301 ffa6869f Iustin Pop
302 c71a1a3d Iustin Pop
Removing an instance is even easier than creating one. This operation is
303 c71a1a3d Iustin Pop
irreversible and destroys all the contents of your instance. Use with
304 c71a1a3d Iustin Pop
care::
305 ffa6869f Iustin Pop
306 73225861 Iustin Pop
  $ gnt-instance remove %INSTANCE_NAME%
307 ffa6869f Iustin Pop
308 d4fcd298 Guido Trotter
.. _instance-startup-label:
309 d4fcd298 Guido Trotter
310 c71a1a3d Iustin Pop
Startup/shutdown
311 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~
312 ffa6869f Iustin Pop
313 ffa6869f Iustin Pop
Instances are automatically started at instance creation time. To
314 ffa6869f Iustin Pop
manually start one which is currently stopped you can run::
315 ffa6869f Iustin Pop
316 73225861 Iustin Pop
  $ gnt-instance startup %INSTANCE_NAME%
317 ffa6869f Iustin Pop
318 d4fcd298 Guido Trotter
Ganeti will start an instance with up to its maximum instance memory. If
319 d4fcd298 Guido Trotter
not enough memory is available Ganeti will use all the available memory
320 7e2f08ba Helga Velroyen
down to the instance minimum memory. If not even that amount of memory
321 d4fcd298 Guido Trotter
is free Ganeti will refuse to start the instance.
322 d4fcd298 Guido Trotter
323 edc282ad Agata Murawska
Note, that this will not work when an instance is in a permanently
324 edc282ad Agata Murawska
stopped state ``offline``. In this case, you will first have to
325 edc282ad Agata Murawska
put it back to online mode by running::
326 edc282ad Agata Murawska
327 73225861 Iustin Pop
  $ gnt-instance modify --online %INSTANCE_NAME%
328 edc282ad Agata Murawska
329 edc282ad Agata Murawska
The command to stop the running instance is::
330 ffa6869f Iustin Pop
331 73225861 Iustin Pop
  $ gnt-instance shutdown %INSTANCE_NAME%
332 ffa6869f Iustin Pop
333 edc282ad Agata Murawska
If you want to shut the instance down more permanently, so that it
334 edc282ad Agata Murawska
does not require dynamically allocated resources (memory and vcpus),
335 edc282ad Agata Murawska
after shutting down an instance, execute the following::
336 edc282ad Agata Murawska
337 73225861 Iustin Pop
  $ gnt-instance modify --offline %INSTANCE_NAME%
338 edc282ad Agata Murawska
339 c71a1a3d Iustin Pop
.. warning:: Do not use the Xen or KVM commands directly to stop
340 c71a1a3d Iustin Pop
   instances. If you run for example ``xm shutdown`` or ``xm destroy``
341 44275c2d Andrea Spadaccini
   on an instance Ganeti will automatically restart it (via
342 22ac4136 Michael Hanselmann
   the :command:`ganeti-watcher(8)` command which is launched via cron).
343 c71a1a3d Iustin Pop
344 c71a1a3d Iustin Pop
Querying instances
345 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~
346 c71a1a3d Iustin Pop
347 c71a1a3d Iustin Pop
There are two ways to get information about instances: listing
348 c71a1a3d Iustin Pop
instances, which does a tabular output containing a given set of fields
349 c71a1a3d Iustin Pop
about each instance, and querying detailed information about a set of
350 c71a1a3d Iustin Pop
instances.
351 c71a1a3d Iustin Pop
352 ffa6869f Iustin Pop
The command to see all the instances configured and their status is::
353 ffa6869f Iustin Pop
354 73225861 Iustin Pop
  $ gnt-instance list
355 ffa6869f Iustin Pop
356 c71a1a3d Iustin Pop
The command can return a custom set of information when using the ``-o``
357 c71a1a3d Iustin Pop
option (as always, check the manpage for a detailed specification). Each
358 c71a1a3d Iustin Pop
instance will be represented on a line, thus making it easy to parse
359 c71a1a3d Iustin Pop
this output via the usual shell utilities (grep, sed, etc.).
360 c71a1a3d Iustin Pop
361 c71a1a3d Iustin Pop
To get more detailed information about an instance, you can run::
362 c71a1a3d Iustin Pop
363 73225861 Iustin Pop
  $ gnt-instance info %INSTANCE%
364 c71a1a3d Iustin Pop
365 c71a1a3d Iustin Pop
which will give a multi-line block of information about the instance,
366 c71a1a3d Iustin Pop
it's hardware resources (especially its disks and their redundancy
367 c71a1a3d Iustin Pop
status), etc. This is harder to parse and is more expensive than the
368 c71a1a3d Iustin Pop
list operation, but returns much more detailed information.
369 ffa6869f Iustin Pop
370 d4fcd298 Guido Trotter
Changing an instance's runtime memory
371 d4fcd298 Guido Trotter
+++++++++++++++++++++++++++++++++++++
372 d4fcd298 Guido Trotter
373 d4fcd298 Guido Trotter
Ganeti will always make sure an instance has a value between its maximum
374 d4fcd298 Guido Trotter
and its minimum memory available as runtime memory. As of version 2.6
375 d4fcd298 Guido Trotter
Ganeti will only choose a size different than the maximum size when
376 d4fcd298 Guido Trotter
starting up, failing over, or migrating an instance on a node with less
377 d4fcd298 Guido Trotter
than the maximum memory available. It won't resize other instances in
378 d4fcd298 Guido Trotter
order to free up space for an instance.
379 d4fcd298 Guido Trotter
380 d4fcd298 Guido Trotter
If you find that you need more memory on a node any instance can be
381 d4fcd298 Guido Trotter
manually resized without downtime, with the command::
382 d4fcd298 Guido Trotter
383 73225861 Iustin Pop
  $ gnt-instance modify -m %SIZE% %INSTANCE_NAME%
384 d4fcd298 Guido Trotter
385 d4fcd298 Guido Trotter
The same command can also be used to increase the memory available on an
386 d4fcd298 Guido Trotter
instance, provided that enough free memory is available on its node, and
387 d4fcd298 Guido Trotter
the specified size is not larger than the maximum memory size the
388 d4fcd298 Guido Trotter
instance had when it was first booted (an instance will be unable to see
389 d4fcd298 Guido Trotter
new memory above the maximum that was specified to the hypervisor at its
390 d4fcd298 Guido Trotter
boot time, if it needs to grow further a reboot becomes necessary).
391 ffa6869f Iustin Pop
392 c71a1a3d Iustin Pop
Export/Import
393 c71a1a3d Iustin Pop
+++++++++++++
394 c71a1a3d Iustin Pop
395 c71a1a3d Iustin Pop
You can create a snapshot of an instance disk and its Ganeti
396 ffa6869f Iustin Pop
configuration, which then you can backup, or import into another
397 ffa6869f Iustin Pop
cluster. The way to export an instance is::
398 ffa6869f Iustin Pop
399 73225861 Iustin Pop
  $ gnt-backup export -n %TARGET_NODE% %INSTANCE_NAME%
400 ffa6869f Iustin Pop
401 c71a1a3d Iustin Pop
402 ffa6869f Iustin Pop
The target node can be any node in the cluster with enough space under
403 c71a1a3d Iustin Pop
``/srv/ganeti`` to hold the instance image. Use the ``--noshutdown``
404 c71a1a3d Iustin Pop
option to snapshot an instance without rebooting it. Note that Ganeti
405 c71a1a3d Iustin Pop
only keeps one snapshot for an instance - any previous snapshot of the
406 c71a1a3d Iustin Pop
same instance existing cluster-wide under ``/srv/ganeti`` will be
407 c71a1a3d Iustin Pop
removed by this operation: if you want to keep them, you need to move
408 c71a1a3d Iustin Pop
them out of the Ganeti exports directory.
409 ffa6869f Iustin Pop
410 c71a1a3d Iustin Pop
Importing an instance is similar to creating a new one, but additionally
411 c71a1a3d Iustin Pop
one must specify the location of the snapshot. The command is::
412 ffa6869f Iustin Pop
413 73225861 Iustin Pop
  $ gnt-backup import -n %TARGET_NODE% \
414 73225861 Iustin Pop
    --src-node=%NODE% --src-dir=%DIR% %INSTANCE_NAME%
415 ffa6869f Iustin Pop
416 33ea43b6 Iustin Pop
By default, parameters will be read from the export information, but you
417 33ea43b6 Iustin Pop
can of course pass them in via the command line - most of the options
418 33ea43b6 Iustin Pop
available for the command :command:`gnt-instance add` are supported here
419 33ea43b6 Iustin Pop
too.
420 ffa6869f Iustin Pop
421 17227cd1 Iustin Pop
Import of foreign instances
422 17227cd1 Iustin Pop
+++++++++++++++++++++++++++
423 17227cd1 Iustin Pop
424 17227cd1 Iustin Pop
There is a possibility to import a foreign instance whose disk data is
425 17227cd1 Iustin Pop
already stored as LVM volumes without going through copying it: the disk
426 17227cd1 Iustin Pop
adoption mode.
427 17227cd1 Iustin Pop
428 17227cd1 Iustin Pop
For this, ensure that the original, non-managed instance is stopped,
429 17227cd1 Iustin Pop
then create a Ganeti instance in the usual way, except that instead of
430 17227cd1 Iustin Pop
passing the disk information you specify the current volumes::
431 17227cd1 Iustin Pop
432 73225861 Iustin Pop
  $ gnt-instance add -t plain -n %HOME_NODE% ... \
433 73225861 Iustin Pop
    --disk 0:adopt=%lv_name%[,vg=%vg_name%] %INSTANCE_NAME%
434 17227cd1 Iustin Pop
435 17227cd1 Iustin Pop
This will take over the given logical volumes, rename them to the Ganeti
436 17227cd1 Iustin Pop
standard (UUID-based), and without installing the OS on them start
437 17227cd1 Iustin Pop
directly the instance. If you configure the hypervisor similar to the
438 17227cd1 Iustin Pop
non-managed configuration that the instance had, the transition should
439 17227cd1 Iustin Pop
be seamless for the instance. For more than one disk, just pass another
440 17227cd1 Iustin Pop
disk parameter (e.g. ``--disk 1:adopt=...``).
441 17227cd1 Iustin Pop
442 fc3914e6 Iustin Pop
Instance kernel selection
443 fc3914e6 Iustin Pop
+++++++++++++++++++++++++
444 fc3914e6 Iustin Pop
445 fc3914e6 Iustin Pop
The kernel that instances uses to bootup can come either from the node,
446 fc3914e6 Iustin Pop
or from instances themselves, depending on the setup.
447 fc3914e6 Iustin Pop
448 fc3914e6 Iustin Pop
Xen-PVM
449 fc3914e6 Iustin Pop
~~~~~~~
450 fc3914e6 Iustin Pop
451 fc3914e6 Iustin Pop
With Xen PVM, there are three options.
452 fc3914e6 Iustin Pop
453 fc3914e6 Iustin Pop
First, you can use a kernel from the node, by setting the hypervisor
454 fc3914e6 Iustin Pop
parameters as such:
455 fc3914e6 Iustin Pop
456 fc3914e6 Iustin Pop
- ``kernel_path`` to a valid file on the node (and appropriately
457 fc3914e6 Iustin Pop
  ``initrd_path``)
458 fc3914e6 Iustin Pop
- ``kernel_args`` optionally set to a valid Linux setting (e.g. ``ro``)
459 fc3914e6 Iustin Pop
- ``root_path`` to a valid setting (e.g. ``/dev/xvda1``)
460 fc3914e6 Iustin Pop
- ``bootloader_path`` and ``bootloader_args`` to empty
461 fc3914e6 Iustin Pop
462 96514751 Michael Hanselmann
Alternatively, you can delegate the kernel management to instances, and
463 fc3914e6 Iustin Pop
use either ``pvgrub`` or the deprecated ``pygrub``. For this, you must
464 96514751 Michael Hanselmann
install the kernels and initrds in the instance and create a valid GRUB
465 fc3914e6 Iustin Pop
v1 configuration file.
466 fc3914e6 Iustin Pop
467 fc3914e6 Iustin Pop
For ``pvgrub`` (new in version 2.4.2), you need to set:
468 fc3914e6 Iustin Pop
469 fc3914e6 Iustin Pop
- ``kernel_path`` to point to the ``pvgrub`` loader present on the node
470 fc3914e6 Iustin Pop
  (e.g. ``/usr/lib/xen/boot/pv-grub-x86_32.gz``)
471 96514751 Michael Hanselmann
- ``kernel_args`` to the path to the GRUB config file, relative to the
472 fc3914e6 Iustin Pop
  instance (e.g. ``(hd0,0)/grub/menu.lst``)
473 fc3914e6 Iustin Pop
- ``root_path`` **must** be empty
474 fc3914e6 Iustin Pop
- ``bootloader_path`` and ``bootloader_args`` to empty
475 fc3914e6 Iustin Pop
476 fc3914e6 Iustin Pop
While ``pygrub`` is deprecated, here is how you can configure it:
477 fc3914e6 Iustin Pop
478 fc3914e6 Iustin Pop
- ``bootloader_path`` to the pygrub binary (e.g. ``/usr/bin/pygrub``)
479 fc3914e6 Iustin Pop
- the other settings are not important
480 fc3914e6 Iustin Pop
481 fc3914e6 Iustin Pop
More information can be found in the Xen wiki pages for `pvgrub
482 fc3914e6 Iustin Pop
<http://wiki.xensource.com/xenwiki/PvGrub>`_ and `pygrub
483 fc3914e6 Iustin Pop
<http://wiki.xensource.com/xenwiki/PyGrub>`_.
484 fc3914e6 Iustin Pop
485 fc3914e6 Iustin Pop
KVM
486 fc3914e6 Iustin Pop
~~~
487 fc3914e6 Iustin Pop
488 fc3914e6 Iustin Pop
For KVM also the kernel can be loaded either way.
489 fc3914e6 Iustin Pop
490 fc3914e6 Iustin Pop
For loading the kernels from the node, you need to set:
491 fc3914e6 Iustin Pop
492 fc3914e6 Iustin Pop
- ``kernel_path`` to a valid value
493 fc3914e6 Iustin Pop
- ``initrd_path`` optionally set if you use an initrd
494 fc3914e6 Iustin Pop
- ``kernel_args`` optionally set to a valid value (e.g. ``ro``)
495 fc3914e6 Iustin Pop
496 fc3914e6 Iustin Pop
If you want instead to have the instance boot from its disk (and execute
497 fc3914e6 Iustin Pop
its bootloader), simply set the ``kernel_path`` parameter to an empty
498 fc3914e6 Iustin Pop
string, and all the others will be ignored.
499 fc3914e6 Iustin Pop
500 c71a1a3d Iustin Pop
Instance HA features
501 c71a1a3d Iustin Pop
--------------------
502 ffa6869f Iustin Pop
503 ffa6869f Iustin Pop
.. note:: This section only applies to multi-node clusters
504 ffa6869f Iustin Pop
505 c71a1a3d Iustin Pop
.. _instance-change-primary-label:
506 c71a1a3d Iustin Pop
507 c71a1a3d Iustin Pop
Changing the primary node
508 c71a1a3d Iustin Pop
+++++++++++++++++++++++++
509 c71a1a3d Iustin Pop
510 c71a1a3d Iustin Pop
There are three ways to exchange an instance's primary and secondary
511 c71a1a3d Iustin Pop
nodes; the right one to choose depends on how the instance has been
512 c71a1a3d Iustin Pop
created and the status of its current primary node. See
513 c71a1a3d Iustin Pop
:ref:`rest-redundancy-label` for information on changing the secondary
514 c71a1a3d Iustin Pop
node. Note that it's only possible to change the primary node to the
515 c71a1a3d Iustin Pop
secondary and vice-versa; a direct change of the primary node with a
516 c71a1a3d Iustin Pop
third node, while keeping the current secondary is not possible in a
517 c71a1a3d Iustin Pop
single step, only via multiple operations as detailed in
518 c71a1a3d Iustin Pop
:ref:`instance-relocation-label`.
519 c71a1a3d Iustin Pop
520 ffa6869f Iustin Pop
Failing over an instance
521 ffa6869f Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~
522 ffa6869f Iustin Pop
523 ffa6869f Iustin Pop
If an instance is built in highly available mode you can at any time
524 ffa6869f Iustin Pop
fail it over to its secondary node, even if the primary has somehow
525 ffa6869f Iustin Pop
failed and it's not up anymore. Doing it is really easy, on the master
526 ffa6869f Iustin Pop
node you can just run::
527 ffa6869f Iustin Pop
528 73225861 Iustin Pop
  $ gnt-instance failover %INSTANCE_NAME%
529 ffa6869f Iustin Pop
530 ffa6869f Iustin Pop
That's it. After the command completes the secondary node is now the
531 c71a1a3d Iustin Pop
primary, and vice-versa.
532 ffa6869f Iustin Pop
533 d4fcd298 Guido Trotter
The instance will be started with an amount of memory between its
534 d4fcd298 Guido Trotter
``maxmem`` and its ``minmem`` value, depending on the free memory on its
535 d4fcd298 Guido Trotter
target node, or the operation will fail if that's not possible. See
536 d4fcd298 Guido Trotter
:ref:`instance-startup-label` for details.
537 d4fcd298 Guido Trotter
538 7ed400f0 Stratos Psomadakis
If the instance's disk template is of type rbd, then you can specify
539 7ed400f0 Stratos Psomadakis
the target node (which can be any node) explicitly, or specify an
540 7ed400f0 Stratos Psomadakis
iallocator plugin. If you omit both, the default iallocator will be
541 7ed400f0 Stratos Psomadakis
used to determine the target node::
542 7ed400f0 Stratos Psomadakis
543 73225861 Iustin Pop
  $ gnt-instance failover -n %TARGET_NODE% %INSTANCE_NAME%
544 7ed400f0 Stratos Psomadakis
545 ffa6869f Iustin Pop
Live migrating an instance
546 ffa6869f Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~
547 ffa6869f Iustin Pop
548 c71a1a3d Iustin Pop
If an instance is built in highly available mode, it currently runs and
549 7e2f08ba Helga Velroyen
both its nodes are running fine, you can migrate it over to its
550 c71a1a3d Iustin Pop
secondary node, without downtime. On the master node you need to run::
551 ffa6869f Iustin Pop
552 73225861 Iustin Pop
  $ gnt-instance migrate %INSTANCE_NAME%
553 ffa6869f Iustin Pop
554 c71a1a3d Iustin Pop
The current load on the instance and its memory size will influence how
555 c71a1a3d Iustin Pop
long the migration will take. In any case, for both KVM and Xen
556 c71a1a3d Iustin Pop
hypervisors, the migration will be transparent to the instance.
557 ffa6869f Iustin Pop
558 d4fcd298 Guido Trotter
If the destination node has less memory than the instance's current
559 d4fcd298 Guido Trotter
runtime memory, but at least the instance's minimum memory available
560 d4fcd298 Guido Trotter
Ganeti will automatically reduce the instance runtime memory before
561 d4fcd298 Guido Trotter
migrating it, unless the ``--no-runtime-changes`` option is passed, in
562 d4fcd298 Guido Trotter
which case the target node should have at least the instance's current
563 d4fcd298 Guido Trotter
runtime memory free.
564 d4fcd298 Guido Trotter
565 7ed400f0 Stratos Psomadakis
If the instance's disk template is of type rbd, then you can specify
566 7ed400f0 Stratos Psomadakis
the target node (which can be any node) explicitly, or specify an
567 7ed400f0 Stratos Psomadakis
iallocator plugin. If you omit both, the default iallocator will be
568 7ed400f0 Stratos Psomadakis
used to determine the target node::
569 7ed400f0 Stratos Psomadakis
570 73225861 Iustin Pop
   $ gnt-instance migrate -n %TARGET_NODE% %INSTANCE_NAME%
571 7ed400f0 Stratos Psomadakis
572 c71a1a3d Iustin Pop
Moving an instance (offline)
573 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
574 ffa6869f Iustin Pop
575 c71a1a3d Iustin Pop
If an instance has not been create as mirrored, then the only way to
576 c71a1a3d Iustin Pop
change its primary node is to execute the move command::
577 ffa6869f Iustin Pop
578 73225861 Iustin Pop
  $ gnt-instance move -n %NEW_NODE% %INSTANCE%
579 ffa6869f Iustin Pop
580 c71a1a3d Iustin Pop
This has a few prerequisites:
581 ffa6869f Iustin Pop
582 c71a1a3d Iustin Pop
- the instance must be stopped
583 c71a1a3d Iustin Pop
- its current primary node must be on-line and healthy
584 c71a1a3d Iustin Pop
- the disks of the instance must not have any errors
585 ffa6869f Iustin Pop
586 c71a1a3d Iustin Pop
Since this operation actually copies the data from the old node to the
587 c71a1a3d Iustin Pop
new node, expect it to take proportional to the size of the instance's
588 c71a1a3d Iustin Pop
disks and the speed of both the nodes' I/O system and their networking.
589 ffa6869f Iustin Pop
590 c71a1a3d Iustin Pop
Disk operations
591 c71a1a3d Iustin Pop
+++++++++++++++
592 ffa6869f Iustin Pop
593 c71a1a3d Iustin Pop
Disk failures are a common cause of errors in any server
594 c71a1a3d Iustin Pop
deployment. Ganeti offers protection from single-node failure if your
595 c71a1a3d Iustin Pop
instances were created in HA mode, and it also offers ways to restore
596 c71a1a3d Iustin Pop
redundancy after a failure.
597 ffa6869f Iustin Pop
598 c71a1a3d Iustin Pop
Preparing for disk operations
599 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
600 ffa6869f Iustin Pop
601 c71a1a3d Iustin Pop
It is important to note that for Ganeti to be able to do any disk
602 5e360222 Michele Tartara
operation, the Linux machines on top of which Ganeti runs must be
603 5e360222 Michele Tartara
consistent; for LVM, this means that the LVM commands must not return
604 5e360222 Michele Tartara
failures; it is common that after a complete disk failure, any LVM
605 5e360222 Michele Tartara
command aborts with an error similar to::
606 ffa6869f Iustin Pop
607 73225861 Iustin Pop
  $ vgs
608 c71a1a3d Iustin Pop
  /dev/sdb1: read failed after 0 of 4096 at 0: Input/output error
609 73225861 Iustin Pop
  /dev/sdb1: read failed after 0 of 4096 at 750153695232: Input/output error
610 c71a1a3d Iustin Pop
  /dev/sdb1: read failed after 0 of 4096 at 0: Input/output error
611 73225861 Iustin Pop
  Couldn't find device with uuid 't30jmN-4Rcf-Fr5e-CURS-pawt-z0jU-m1TgeJ'.
612 c71a1a3d Iustin Pop
  Couldn't find all physical volumes for volume group xenvg.
613 ffa6869f Iustin Pop
614 c71a1a3d Iustin Pop
Before restoring an instance's disks to healthy status, it's needed to
615 c71a1a3d Iustin Pop
fix the volume group used by Ganeti so that we can actually create and
616 c71a1a3d Iustin Pop
manage the logical volumes. This is usually done in a multi-step
617 c71a1a3d Iustin Pop
process:
618 ffa6869f Iustin Pop
619 c71a1a3d Iustin Pop
#. first, if the disk is completely gone and LVM commands exit with
620 c71a1a3d Iustin Pop
   “Couldn't find device with uuid…” then you need to run the command::
621 c71a1a3d Iustin Pop
622 73225861 Iustin Pop
    $ vgreduce --removemissing %VOLUME_GROUP%
623 c71a1a3d Iustin Pop
624 c71a1a3d Iustin Pop
#. after the above command, the LVM commands should be executing
625 c71a1a3d Iustin Pop
   normally (warnings are normal, but the commands will not fail
626 c71a1a3d Iustin Pop
   completely).
627 c71a1a3d Iustin Pop
628 c71a1a3d Iustin Pop
#. if the failed disk is still visible in the output of the ``pvs``
629 c71a1a3d Iustin Pop
   command, you need to deactivate it from allocations by running::
630 c71a1a3d Iustin Pop
631 73225861 Iustin Pop
    $ pvs -x n /dev/%DISK%
632 ffa6869f Iustin Pop
633 c71a1a3d Iustin Pop
At this point, the volume group should be consistent and any bad
634 c71a1a3d Iustin Pop
physical volumes should not longer be available for allocation.
635 c71a1a3d Iustin Pop
636 c71a1a3d Iustin Pop
Note that since version 2.1 Ganeti provides some commands to automate
637 c71a1a3d Iustin Pop
these two operations, see :ref:`storage-units-label`.
638 c71a1a3d Iustin Pop
639 c71a1a3d Iustin Pop
.. _rest-redundancy-label:
640 c71a1a3d Iustin Pop
641 c71a1a3d Iustin Pop
Restoring redundancy for DRBD-based instances
642 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
643 c71a1a3d Iustin Pop
644 c71a1a3d Iustin Pop
A DRBD instance has two nodes, and the storage on one of them has
645 c71a1a3d Iustin Pop
failed. Depending on which node (primary or secondary) has failed, you
646 c71a1a3d Iustin Pop
have three options at hand:
647 c71a1a3d Iustin Pop
648 c71a1a3d Iustin Pop
- if the storage on the primary node has failed, you need to re-create
649 c71a1a3d Iustin Pop
  the disks on it
650 c71a1a3d Iustin Pop
- if the storage on the secondary node has failed, you can either
651 c71a1a3d Iustin Pop
  re-create the disks on it or change the secondary and recreate
652 c71a1a3d Iustin Pop
  redundancy on the new secondary node
653 c71a1a3d Iustin Pop
654 c71a1a3d Iustin Pop
Of course, at any point it's possible to force re-creation of disks even
655 c71a1a3d Iustin Pop
though everything is already fine.
656 c71a1a3d Iustin Pop
657 c71a1a3d Iustin Pop
For all three cases, the ``replace-disks`` operation can be used::
658 c71a1a3d Iustin Pop
659 c71a1a3d Iustin Pop
  # re-create disks on the primary node
660 73225861 Iustin Pop
  $ gnt-instance replace-disks -p %INSTANCE_NAME%
661 c71a1a3d Iustin Pop
  # re-create disks on the current secondary
662 73225861 Iustin Pop
  $ gnt-instance replace-disks -s %INSTANCE_NAME%
663 c71a1a3d Iustin Pop
  # change the secondary node, via manual specification
664 73225861 Iustin Pop
  $ gnt-instance replace-disks -n %NODE% %INSTANCE_NAME%
665 c71a1a3d Iustin Pop
  # change the secondary node, via an iallocator script
666 73225861 Iustin Pop
  $ gnt-instance replace-disks -I %SCRIPT% %INSTANCE_NAME%
667 c71a1a3d Iustin Pop
  # since Ganeti 2.1: automatically fix the primary or secondary node
668 73225861 Iustin Pop
  $ gnt-instance replace-disks -a %INSTANCE_NAME%
669 c71a1a3d Iustin Pop
670 c71a1a3d Iustin Pop
Since the process involves copying all data from the working node to the
671 c71a1a3d Iustin Pop
target node, it will take a while, depending on the instance's disk
672 1cdc9dbb Bernardo Dal Seno
size, node I/O system and network speed. But it is (barring any network
673 c71a1a3d Iustin Pop
interruption) completely transparent for the instance.
674 c71a1a3d Iustin Pop
675 c71a1a3d Iustin Pop
Re-creating disks for non-redundant instances
676 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
677 c71a1a3d Iustin Pop
678 c71a1a3d Iustin Pop
.. versionadded:: 2.1
679 c71a1a3d Iustin Pop
680 c71a1a3d Iustin Pop
For non-redundant instances, there isn't a copy (except backups) to
681 c71a1a3d Iustin Pop
re-create the disks. But it's possible to at-least re-create empty
682 c71a1a3d Iustin Pop
disks, after which a reinstall can be run, via the ``recreate-disks``
683 c71a1a3d Iustin Pop
command::
684 c71a1a3d Iustin Pop
685 73225861 Iustin Pop
  $ gnt-instance recreate-disks %INSTANCE%
686 c71a1a3d Iustin Pop
687 38db4e7c Adam Ingrassia
Note that this will fail if the disks already exists. The instance can
688 38db4e7c Adam Ingrassia
be assigned to new nodes automatically by specifying an iallocator
689 38db4e7c Adam Ingrassia
through the ``--iallocator`` option.
690 c71a1a3d Iustin Pop
691 bbf74a76 Iustin Pop
Conversion of an instance's disk type
692 bbf74a76 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
693 bbf74a76 Iustin Pop
694 bbf74a76 Iustin Pop
It is possible to convert between a non-redundant instance of type
695 bbf74a76 Iustin Pop
``plain`` (LVM storage) and redundant ``drbd`` via the ``gnt-instance
696 bbf74a76 Iustin Pop
modify`` command::
697 bbf74a76 Iustin Pop
698 bbf74a76 Iustin Pop
  # start with a non-redundant instance
699 73225861 Iustin Pop
  $ gnt-instance add -t plain ... %INSTANCE%
700 bbf74a76 Iustin Pop
701 bbf74a76 Iustin Pop
  # later convert it to redundant
702 73225861 Iustin Pop
  $ gnt-instance stop %INSTANCE%
703 73225861 Iustin Pop
  $ gnt-instance modify -t drbd -n %NEW_SECONDARY% %INSTANCE%
704 73225861 Iustin Pop
  $ gnt-instance start %INSTANCE%
705 bbf74a76 Iustin Pop
706 bbf74a76 Iustin Pop
  # and convert it back
707 73225861 Iustin Pop
  $ gnt-instance stop %INSTANCE%
708 73225861 Iustin Pop
  $ gnt-instance modify -t plain %INSTANCE%
709 73225861 Iustin Pop
  $ gnt-instance start %INSTANCE%
710 bbf74a76 Iustin Pop
711 bbf74a76 Iustin Pop
The conversion must be done while the instance is stopped, and
712 bbf74a76 Iustin Pop
converting from plain to drbd template presents a small risk, especially
713 bbf74a76 Iustin Pop
if the instance has multiple disks and/or if one node fails during the
714 bbf74a76 Iustin Pop
conversion procedure). As such, it's recommended (as always) to make
715 bbf74a76 Iustin Pop
sure that downtime for manual recovery is acceptable and that the
716 bbf74a76 Iustin Pop
instance has up-to-date backups.
717 bbf74a76 Iustin Pop
718 c71a1a3d Iustin Pop
Debugging instances
719 c71a1a3d Iustin Pop
+++++++++++++++++++
720 ffa6869f Iustin Pop
721 ffa6869f Iustin Pop
Accessing an instance's disks
722 ffa6869f Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
723 ffa6869f Iustin Pop
724 c71a1a3d Iustin Pop
From an instance's primary node you can have access to its disks. Never
725 ffa6869f Iustin Pop
ever mount the underlying logical volume manually on a fault tolerant
726 c71a1a3d Iustin Pop
instance, or will break replication and your data will be
727 c71a1a3d Iustin Pop
inconsistent. The correct way to access an instance's disks is to run
728 c71a1a3d Iustin Pop
(on the master node, as usual) the command::
729 c71a1a3d Iustin Pop
730 73225861 Iustin Pop
  $ gnt-instance activate-disks %INSTANCE%
731 c71a1a3d Iustin Pop
732 c71a1a3d Iustin Pop
And then, *on the primary node of the instance*, access the device that
733 c71a1a3d Iustin Pop
gets created. For example, you could mount the given disks, then edit
734 c71a1a3d Iustin Pop
files on the filesystem, etc.
735 c71a1a3d Iustin Pop
736 c71a1a3d Iustin Pop
Note that with partitioned disks (as opposed to whole-disk filesystems),
737 c71a1a3d Iustin Pop
you will need to use a tool like :manpage:`kpartx(8)`::
738 ffa6869f Iustin Pop
739 73225861 Iustin Pop
  # on node1
740 73225861 Iustin Pop
  $ gnt-instance activate-disks %instance1%
741 73225861 Iustin Pop
  node3:disk/0:…
742 73225861 Iustin Pop
  $ ssh node3
743 73225861 Iustin Pop
  # on node 3
744 73225861 Iustin Pop
  $ kpartx -l /dev/…
745 73225861 Iustin Pop
  $ kpartx -a /dev/…
746 73225861 Iustin Pop
  $ mount /dev/mapper/… /mnt/
747 c71a1a3d Iustin Pop
  # edit files under mnt as desired
748 73225861 Iustin Pop
  $ umount /mnt/
749 73225861 Iustin Pop
  $ kpartx -d /dev/…
750 73225861 Iustin Pop
  $ exit
751 73225861 Iustin Pop
  # back to node 1
752 ffa6869f Iustin Pop
753 c71a1a3d Iustin Pop
After you've finished you can deactivate them with the deactivate-disks
754 c71a1a3d Iustin Pop
command, which works in the same way::
755 c71a1a3d Iustin Pop
756 73225861 Iustin Pop
  $ gnt-instance deactivate-disks %INSTANCE%
757 c71a1a3d Iustin Pop
758 c71a1a3d Iustin Pop
Note that if any process started by you is still using the disks, the
759 c71a1a3d Iustin Pop
above command will error out, and you **must** cleanup and ensure that
760 c71a1a3d Iustin Pop
the above command runs successfully before you start the instance,
761 c71a1a3d Iustin Pop
otherwise the instance will suffer corruption.
762 ffa6869f Iustin Pop
763 ffa6869f Iustin Pop
Accessing an instance's console
764 fd07c6b3 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
765 ffa6869f Iustin Pop
766 ffa6869f Iustin Pop
The command to access a running instance's console is::
767 ffa6869f Iustin Pop
768 73225861 Iustin Pop
  $ gnt-instance console %INSTANCE_NAME%
769 ffa6869f Iustin Pop
770 c71a1a3d Iustin Pop
Use the console normally and then type ``^]`` when done, to exit.
771 c71a1a3d Iustin Pop
772 c71a1a3d Iustin Pop
Other instance operations
773 c71a1a3d Iustin Pop
+++++++++++++++++++++++++
774 c71a1a3d Iustin Pop
775 c71a1a3d Iustin Pop
Reboot
776 c71a1a3d Iustin Pop
~~~~~~
777 ffa6869f Iustin Pop
778 c71a1a3d Iustin Pop
There is a wrapper command for rebooting instances::
779 ffa6869f Iustin Pop
780 73225861 Iustin Pop
  $ gnt-instance reboot %instance2%
781 c71a1a3d Iustin Pop
782 c71a1a3d Iustin Pop
By default, this does the equivalent of shutting down and then starting
783 c71a1a3d Iustin Pop
the instance, but it accepts parameters to perform a soft-reboot (via
784 c71a1a3d Iustin Pop
the hypervisor), a hard reboot (hypervisor shutdown and then startup) or
785 c71a1a3d Iustin Pop
a full one (the default, which also de-configures and then configures
786 c71a1a3d Iustin Pop
again the disks of the instance).
787 c71a1a3d Iustin Pop
788 c71a1a3d Iustin Pop
Instance OS definitions debugging
789 c71a1a3d Iustin Pop
+++++++++++++++++++++++++++++++++
790 c71a1a3d Iustin Pop
791 c71a1a3d Iustin Pop
Should you have any problems with instance operating systems the command
792 c71a1a3d Iustin Pop
to see a complete status for all your nodes is::
793 ffa6869f Iustin Pop
794 73225861 Iustin Pop
   $ gnt-os diagnose
795 ffa6869f Iustin Pop
796 c71a1a3d Iustin Pop
.. _instance-relocation-label:
797 ffa6869f Iustin Pop
798 c71a1a3d Iustin Pop
Instance relocation
799 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~
800 ffa6869f Iustin Pop
801 c71a1a3d Iustin Pop
While it is not possible to move an instance from nodes ``(A, B)`` to
802 c71a1a3d Iustin Pop
nodes ``(C, D)`` in a single move, it is possible to do so in a few
803 c71a1a3d Iustin Pop
steps::
804 ffa6869f Iustin Pop
805 c71a1a3d Iustin Pop
  # instance is located on A, B
806 fe0d94d8 Guido Trotter
  $ gnt-instance replace-disks -n %nodeC% %instance1%
807 c71a1a3d Iustin Pop
  # instance has moved from (A, B) to (A, C)
808 c71a1a3d Iustin Pop
  # we now flip the primary/secondary nodes
809 73225861 Iustin Pop
  $ gnt-instance migrate %instance1%
810 c71a1a3d Iustin Pop
  # instance lives on (C, A)
811 c71a1a3d Iustin Pop
  # we can then change A to D via:
812 fe0d94d8 Guido Trotter
  $ gnt-instance replace-disks -n %nodeD% %instance1%
813 56c9a709 Iustin Pop
814 c71a1a3d Iustin Pop
Which brings it into the final configuration of ``(C, D)``. Note that we
815 c71a1a3d Iustin Pop
needed to do two replace-disks operation (two copies of the instance
816 c71a1a3d Iustin Pop
disks), because we needed to get rid of both the original nodes (A and
817 c71a1a3d Iustin Pop
B).
818 c71a1a3d Iustin Pop
819 213ffbb1 Dimitris Aragiorgis
Network Management
820 213ffbb1 Dimitris Aragiorgis
------------------
821 213ffbb1 Dimitris Aragiorgis
822 213ffbb1 Dimitris Aragiorgis
Ganeti used to describe NICs of an Instance with an IP, a MAC, a connectivity
823 213ffbb1 Dimitris Aragiorgis
link and mode. This had three major shortcomings:
824 213ffbb1 Dimitris Aragiorgis
825 213ffbb1 Dimitris Aragiorgis
  * there was no easy way to assign a unique IP to an instance
826 213ffbb1 Dimitris Aragiorgis
  * network info (subnet, gateway, domain, etc.) was not available on target
827 213ffbb1 Dimitris Aragiorgis
    node (kvm-ifup, hooks, etc)
828 213ffbb1 Dimitris Aragiorgis
  * one should explicitly pass L2 info (mode, and link) to every NIC
829 213ffbb1 Dimitris Aragiorgis
830 213ffbb1 Dimitris Aragiorgis
Plus there was no easy way to get the current networking overview (which
831 213ffbb1 Dimitris Aragiorgis
instances are on the same L2 or L3 network, which IPs are reserved, etc).
832 213ffbb1 Dimitris Aragiorgis
833 213ffbb1 Dimitris Aragiorgis
All the above required an external management tool that has an overall view
834 213ffbb1 Dimitris Aragiorgis
and provides the corresponding info to Ganeti.
835 213ffbb1 Dimitris Aragiorgis
836 213ffbb1 Dimitris Aragiorgis
gnt-network aims to support a big part of this functionality inside Ganeti and
837 213ffbb1 Dimitris Aragiorgis
abstract the network as a separate entity. Currently, a Ganeti network
838 213ffbb1 Dimitris Aragiorgis
provides the following:
839 213ffbb1 Dimitris Aragiorgis
840 213ffbb1 Dimitris Aragiorgis
  * A single IPv4 pool, subnet and gateway
841 213ffbb1 Dimitris Aragiorgis
  * Connectivity info per nodegroup (mode, link)
842 213ffbb1 Dimitris Aragiorgis
  * MAC prefix for each NIC inside the network
843 213ffbb1 Dimitris Aragiorgis
  * IPv6 prefix/Gateway related to this network
844 213ffbb1 Dimitris Aragiorgis
  * Tags
845 213ffbb1 Dimitris Aragiorgis
846 213ffbb1 Dimitris Aragiorgis
IP pool management ensures IP uniqueness inside this network. The user can
847 213ffbb1 Dimitris Aragiorgis
pass `ip=pool,network=test` and will:
848 213ffbb1 Dimitris Aragiorgis
849 213ffbb1 Dimitris Aragiorgis
1. Get the first available IP in the pool
850 213ffbb1 Dimitris Aragiorgis
2. Inherit the connectivity mode and link of the network's netparams
851 213ffbb1 Dimitris Aragiorgis
3. NIC will obtain the MAC prefix of the network
852 213ffbb1 Dimitris Aragiorgis
4. All network related info will be available as environment variables in
853 213ffbb1 Dimitris Aragiorgis
   kvm-ifup scripts and hooks, so that they can dynamically manage all
854 213ffbb1 Dimitris Aragiorgis
   networking-related setup on the host.
855 213ffbb1 Dimitris Aragiorgis
856 213ffbb1 Dimitris Aragiorgis
Hands on with gnt-network
857 213ffbb1 Dimitris Aragiorgis
+++++++++++++++++++++++++
858 213ffbb1 Dimitris Aragiorgis
859 213ffbb1 Dimitris Aragiorgis
To create a network do::
860 213ffbb1 Dimitris Aragiorgis
861 213ffbb1 Dimitris Aragiorgis
  # gnt-network add --network=192.0.2.0/24 --gateway=192.0.2.1 test
862 213ffbb1 Dimitris Aragiorgis
863 213ffbb1 Dimitris Aragiorgis
Please see all other available options (--add-reserved-ips, --mac-prefix,
864 ebbdde89 Dimitris Aragiorgis
--network6, --gateway6, --tags).
865 ebbdde89 Dimitris Aragiorgis
866 ebbdde89 Dimitris Aragiorgis
Currently, IPv6 info is not used by Ganeti itself. It only gets exported
867 ebbdde89 Dimitris Aragiorgis
to NIC configuration scripts and hooks via environment variables.
868 213ffbb1 Dimitris Aragiorgis
869 213ffbb1 Dimitris Aragiorgis
To make this network available on a nodegroup you should specify the
870 213ffbb1 Dimitris Aragiorgis
connectivity mode and link during connection::
871 213ffbb1 Dimitris Aragiorgis
872 213ffbb1 Dimitris Aragiorgis
  # gnt-network connect test bridged br100 default nodegroup1
873 213ffbb1 Dimitris Aragiorgis
874 213ffbb1 Dimitris Aragiorgis
To add a NIC inside this network::
875 213ffbb1 Dimitris Aragiorgis
876 213ffbb1 Dimitris Aragiorgis
  # gnt-instance modify --net -1:add,ip=pool,network=test inst1
877 213ffbb1 Dimitris Aragiorgis
878 213ffbb1 Dimitris Aragiorgis
This will let a NIC obtain a unique IP inside this network, and inherit the
879 213ffbb1 Dimitris Aragiorgis
nodegroup's netparams (bridged, br100). IP here is optional. If missing the
880 213ffbb1 Dimitris Aragiorgis
NIC will just get the L2 info.
881 213ffbb1 Dimitris Aragiorgis
882 213ffbb1 Dimitris Aragiorgis
To move an existing NIC from a network to another and remove its IP::
883 213ffbb1 Dimitris Aragiorgis
884 213ffbb1 Dimitris Aragiorgis
  # gnt-instance modify --net -1:ip=none,network=test1 inst1
885 213ffbb1 Dimitris Aragiorgis
886 213ffbb1 Dimitris Aragiorgis
This will release the old IP from the old IP pool and the NIC will inherit the
887 213ffbb1 Dimitris Aragiorgis
new nicparams.
888 213ffbb1 Dimitris Aragiorgis
889 213ffbb1 Dimitris Aragiorgis
On the above actions there is a extra option `--no-conflicts-ckeck`. This
890 213ffbb1 Dimitris Aragiorgis
does not check for conflicting setups. Specifically:
891 213ffbb1 Dimitris Aragiorgis
892 213ffbb1 Dimitris Aragiorgis
1. When a network is added, IPs of nodes and master are not being checked.
893 213ffbb1 Dimitris Aragiorgis
2. When connecting a network on a nodegroup, IPs of instances inside this
894 213ffbb1 Dimitris Aragiorgis
   nodegroup are not checked whether they reside inside the subnet or not.
895 213ffbb1 Dimitris Aragiorgis
3. When specifying explicitly a IP without passing a network, Ganeti will not
896 213ffbb1 Dimitris Aragiorgis
   check if this IP is included inside any available network on the nodegroup.
897 213ffbb1 Dimitris Aragiorgis
898 213ffbb1 Dimitris Aragiorgis
External components
899 213ffbb1 Dimitris Aragiorgis
+++++++++++++++++++
900 213ffbb1 Dimitris Aragiorgis
901 213ffbb1 Dimitris Aragiorgis
All the aforementioned steps assure NIC configuration from the Ganeti
902 213ffbb1 Dimitris Aragiorgis
perspective. Of course this has nothing to do, how the instance eventually will
903 213ffbb1 Dimitris Aragiorgis
get the desired connectivity (IPv4, IPv6, default routes, DNS info, etc) and
904 213ffbb1 Dimitris Aragiorgis
where will the IP resolve.  This functionality is managed by the external
905 213ffbb1 Dimitris Aragiorgis
components.
906 213ffbb1 Dimitris Aragiorgis
907 213ffbb1 Dimitris Aragiorgis
Let's assume that the VM will need to obtain a dynamic IP via DHCP, get a SLAAC
908 213ffbb1 Dimitris Aragiorgis
address, and use DHCPv6 for other configuration information (in case RFC-6106
909 213ffbb1 Dimitris Aragiorgis
is not supported by the client, e.g.  Windows).  This means that the following
910 213ffbb1 Dimitris Aragiorgis
external services are needed:
911 213ffbb1 Dimitris Aragiorgis
912 213ffbb1 Dimitris Aragiorgis
1. A DHCP server
913 213ffbb1 Dimitris Aragiorgis
2. An IPv6 router sending Router Advertisements
914 213ffbb1 Dimitris Aragiorgis
3. A DHCPv6 server exporting DNS info
915 213ffbb1 Dimitris Aragiorgis
4. A dynamic DNS server
916 213ffbb1 Dimitris Aragiorgis
917 213ffbb1 Dimitris Aragiorgis
These components must be configured dynamically and on a per NIC basis.
918 213ffbb1 Dimitris Aragiorgis
The way to do this is by using custom kvm-ifup scripts and hooks.
919 213ffbb1 Dimitris Aragiorgis
920 213ffbb1 Dimitris Aragiorgis
snf-network
921 213ffbb1 Dimitris Aragiorgis
~~~~~~~~~~~
922 213ffbb1 Dimitris Aragiorgis
923 213ffbb1 Dimitris Aragiorgis
The snf-network package [1,3] includes custom scripts that will provide the
924 213ffbb1 Dimitris Aragiorgis
aforementioned functionality. `kvm-vif-bridge` and `vif-custom` is an
925 213ffbb1 Dimitris Aragiorgis
alternative to `kvm-ifup` and `vif-ganeti` that take into account all network
926 213ffbb1 Dimitris Aragiorgis
info being exported. Their actions depend on network tags. Specifically:
927 213ffbb1 Dimitris Aragiorgis
928 213ffbb1 Dimitris Aragiorgis
`dns`: will update an external DDNS server (nsupdate on a bind server)
929 213ffbb1 Dimitris Aragiorgis
930 213ffbb1 Dimitris Aragiorgis
`ip-less-routed`: will setup routes, rules and proxy ARP
931 213ffbb1 Dimitris Aragiorgis
This setup assumes a pre-existing routing table along with some local
932 213ffbb1 Dimitris Aragiorgis
configuration and provides connectivity to instances via an external
933 213ffbb1 Dimitris Aragiorgis
gateway/router without requiring nodes to have an IP inside this network.
934 213ffbb1 Dimitris Aragiorgis
935 213ffbb1 Dimitris Aragiorgis
`private-filtered`: will setup ebtables rules to ensure L2 isolation on a
936 213ffbb1 Dimitris Aragiorgis
common bridge. Only packets with the same MAC prefix will be forwarded to the
937 213ffbb1 Dimitris Aragiorgis
corresponding virtual interface.
938 213ffbb1 Dimitris Aragiorgis
939 213ffbb1 Dimitris Aragiorgis
`nfdhcpd`: will update an external DHCP server
940 213ffbb1 Dimitris Aragiorgis
941 213ffbb1 Dimitris Aragiorgis
nfdhcpd
942 213ffbb1 Dimitris Aragiorgis
~~~~~~~
943 213ffbb1 Dimitris Aragiorgis
944 213ffbb1 Dimitris Aragiorgis
snf-network works with nfdhcpd [2,3]: a custom user space DHCP
945 213ffbb1 Dimitris Aragiorgis
server based on NFQUEUE. Currently, nfdhcpd replies on BOOTP/DHCP requests
946 213ffbb1 Dimitris Aragiorgis
originating from a tap or a bridge. Additionally in case of a routed setup it
947 213ffbb1 Dimitris Aragiorgis
provides a ra-stateless configuration by responding to router and neighbour
948 213ffbb1 Dimitris Aragiorgis
solicitations along with DHCPv6 requests for DNS options.  Its db is
949 213ffbb1 Dimitris Aragiorgis
dynamically updated using text files inside a local dir with inotify
950 213ffbb1 Dimitris Aragiorgis
(snf-network just adds a per NIC binding file with all relevant info if the
951 213ffbb1 Dimitris Aragiorgis
corresponding network tag is found). Still we need to mangle all these
952 213ffbb1 Dimitris Aragiorgis
packets and send them to the corresponding NFQUEUE.
953 213ffbb1 Dimitris Aragiorgis
954 213ffbb1 Dimitris Aragiorgis
Known shortcomings
955 213ffbb1 Dimitris Aragiorgis
++++++++++++++++++
956 213ffbb1 Dimitris Aragiorgis
957 213ffbb1 Dimitris Aragiorgis
Currently the following things are some know weak points of the gnt-network
958 213ffbb1 Dimitris Aragiorgis
design and implementation:
959 213ffbb1 Dimitris Aragiorgis
960 213ffbb1 Dimitris Aragiorgis
 * Cannot define a network without an IP pool
961 213ffbb1 Dimitris Aragiorgis
 * The pool defines the size of the network
962 213ffbb1 Dimitris Aragiorgis
 * Reserved IPs must be defined explicitly (inconvenient for a big range)
963 213ffbb1 Dimitris Aragiorgis
 * Cannot define an IPv6 only network
964 213ffbb1 Dimitris Aragiorgis
965 213ffbb1 Dimitris Aragiorgis
Future work
966 213ffbb1 Dimitris Aragiorgis
+++++++++++
967 213ffbb1 Dimitris Aragiorgis
968 213ffbb1 Dimitris Aragiorgis
Any upcoming patches should target:
969 213ffbb1 Dimitris Aragiorgis
970 213ffbb1 Dimitris Aragiorgis
 * Separate L2, L3, IPv6, IP pool info
971 213ffbb1 Dimitris Aragiorgis
 * Support a set of IP pools per network
972 213ffbb1 Dimitris Aragiorgis
 * Make IP/network in NIC object take a list of entries
973 213ffbb1 Dimitris Aragiorgis
 * Introduce external scripts for node configuration
974 213ffbb1 Dimitris Aragiorgis
   (dynamically create/destroy bridges/routes upon network connect/disconnect)
975 213ffbb1 Dimitris Aragiorgis
976 213ffbb1 Dimitris Aragiorgis
[1] https://code.grnet.gr/git/snf-network
977 213ffbb1 Dimitris Aragiorgis
[2] https://code.grnet.gr/git/snf-nfdhcpd
978 213ffbb1 Dimitris Aragiorgis
[3] deb http:/apt.dev.grnet.gr/ wheezy/
979 213ffbb1 Dimitris Aragiorgis
980 c71a1a3d Iustin Pop
Node operations
981 c71a1a3d Iustin Pop
---------------
982 c71a1a3d Iustin Pop
983 c71a1a3d Iustin Pop
There are much fewer node operations available than for instances, but
984 c71a1a3d Iustin Pop
they are equivalently important for maintaining a healthy cluster.
985 c71a1a3d Iustin Pop
986 c71a1a3d Iustin Pop
Add/readd
987 c71a1a3d Iustin Pop
+++++++++
988 c71a1a3d Iustin Pop
989 c71a1a3d Iustin Pop
It is at any time possible to extend the cluster with one more node, by
990 c71a1a3d Iustin Pop
using the node add operation::
991 c71a1a3d Iustin Pop
992 73225861 Iustin Pop
  $ gnt-node add %NEW_NODE%
993 c71a1a3d Iustin Pop
994 c71a1a3d Iustin Pop
If the cluster has a replication network defined, then you need to pass
995 c71a1a3d Iustin Pop
the ``-s REPLICATION_IP`` parameter to this option.
996 c71a1a3d Iustin Pop
997 c71a1a3d Iustin Pop
A variation of this command can be used to re-configure a node if its
998 c71a1a3d Iustin Pop
Ganeti configuration is broken, for example if it has been reinstalled
999 c71a1a3d Iustin Pop
by mistake::
1000 c71a1a3d Iustin Pop
1001 73225861 Iustin Pop
  $ gnt-node add --readd %EXISTING_NODE%
1002 c71a1a3d Iustin Pop
1003 c71a1a3d Iustin Pop
This will reinitialise the node as if it's been newly added, but while
1004 c71a1a3d Iustin Pop
keeping its existing configuration in the cluster (primary/secondary IP,
1005 c71a1a3d Iustin Pop
etc.), in other words you won't need to use ``-s`` here.
1006 c71a1a3d Iustin Pop
1007 c71a1a3d Iustin Pop
Changing the node role
1008 c71a1a3d Iustin Pop
++++++++++++++++++++++
1009 c71a1a3d Iustin Pop
1010 c71a1a3d Iustin Pop
A node can be in different roles, as explained in the
1011 c71a1a3d Iustin Pop
:ref:`terminology-label` section. Promoting a node to the master role is
1012 c71a1a3d Iustin Pop
special, while the other roles are handled all via a single command.
1013 c71a1a3d Iustin Pop
1014 c71a1a3d Iustin Pop
Failing over the master node
1015 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1016 c71a1a3d Iustin Pop
1017 c71a1a3d Iustin Pop
If you want to promote a different node to the master role (for whatever
1018 c71a1a3d Iustin Pop
reason), run on any other master-candidate node the command::
1019 c71a1a3d Iustin Pop
1020 73225861 Iustin Pop
  $ gnt-cluster master-failover
1021 c71a1a3d Iustin Pop
1022 c71a1a3d Iustin Pop
and the node you ran it on is now the new master. In case you try to run
1023 c71a1a3d Iustin Pop
this on a non master-candidate node, you will get an error telling you
1024 c71a1a3d Iustin Pop
which nodes are valid.
1025 c71a1a3d Iustin Pop
1026 c71a1a3d Iustin Pop
Changing between the other roles
1027 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1028 c71a1a3d Iustin Pop
1029 c71a1a3d Iustin Pop
The ``gnt-node modify`` command can be used to select a new role::
1030 c71a1a3d Iustin Pop
1031 c71a1a3d Iustin Pop
  # change to master candidate
1032 73225861 Iustin Pop
  $ gnt-node modify -C yes %NODE%
1033 c71a1a3d Iustin Pop
  # change to drained status
1034 73225861 Iustin Pop
  $ gnt-node modify -D yes %NODE%
1035 c71a1a3d Iustin Pop
  # change to offline status
1036 73225861 Iustin Pop
  $ gnt-node modify -O yes %NODE%
1037 c71a1a3d Iustin Pop
  # change to regular mode (reset all flags)
1038 73225861 Iustin Pop
  $ gnt-node modify -O no -D no -C no %NODE%
1039 c71a1a3d Iustin Pop
1040 c71a1a3d Iustin Pop
Note that the cluster requires that at any point in time, a certain
1041 c71a1a3d Iustin Pop
number of nodes are master candidates, so changing from master candidate
1042 c71a1a3d Iustin Pop
to other roles might fail. It is recommended to either force the
1043 c71a1a3d Iustin Pop
operation (via the ``--force`` option) or first change the number of
1044 c71a1a3d Iustin Pop
master candidates in the cluster - see :ref:`cluster-config-label`.
1045 c71a1a3d Iustin Pop
1046 c71a1a3d Iustin Pop
Evacuating nodes
1047 c71a1a3d Iustin Pop
++++++++++++++++
1048 c71a1a3d Iustin Pop
1049 c71a1a3d Iustin Pop
There are two steps of moving instances off a node:
1050 c71a1a3d Iustin Pop
1051 c71a1a3d Iustin Pop
- moving the primary instances (actually converting them into secondary
1052 c71a1a3d Iustin Pop
  instances)
1053 c71a1a3d Iustin Pop
- moving the secondary instances (including any instances converted in
1054 c71a1a3d Iustin Pop
  the step above)
1055 c71a1a3d Iustin Pop
1056 c71a1a3d Iustin Pop
Primary instance conversion
1057 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1058 c71a1a3d Iustin Pop
1059 c71a1a3d Iustin Pop
For this step, you can use either individual instance move
1060 c71a1a3d Iustin Pop
commands (as seen in :ref:`instance-change-primary-label`) or the bulk
1061 c71a1a3d Iustin Pop
per-node versions; these are::
1062 c71a1a3d Iustin Pop
1063 73225861 Iustin Pop
  $ gnt-node migrate %NODE%
1064 73225861 Iustin Pop
  $ gnt-node evacuate -s %NODE%
1065 c71a1a3d Iustin Pop
1066 c71a1a3d Iustin Pop
Note that the instance “move” command doesn't currently have a node
1067 c71a1a3d Iustin Pop
equivalent.
1068 c71a1a3d Iustin Pop
1069 c71a1a3d Iustin Pop
Both these commands, or the equivalent per-instance command, will make
1070 c71a1a3d Iustin Pop
this node the secondary node for the respective instances, whereas their
1071 c71a1a3d Iustin Pop
current secondary node will become primary. Note that it is not possible
1072 c71a1a3d Iustin Pop
to change in one step the primary node to another node as primary, while
1073 c71a1a3d Iustin Pop
keeping the same secondary node.
1074 c71a1a3d Iustin Pop
1075 c71a1a3d Iustin Pop
Secondary instance evacuation
1076 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1077 c71a1a3d Iustin Pop
1078 c71a1a3d Iustin Pop
For the evacuation of secondary instances, a command called
1079 c71a1a3d Iustin Pop
:command:`gnt-node evacuate` is provided and its syntax is::
1080 c71a1a3d Iustin Pop
1081 73225861 Iustin Pop
  $ gnt-node evacuate -I %IALLOCATOR_SCRIPT% %NODE%
1082 73225861 Iustin Pop
  $ gnt-node evacuate -n %DESTINATION_NODE% %NODE%
1083 c71a1a3d Iustin Pop
1084 c71a1a3d Iustin Pop
The first version will compute the new secondary for each instance in
1085 c71a1a3d Iustin Pop
turn using the given iallocator script, whereas the second one will
1086 c71a1a3d Iustin Pop
simply move all instances to DESTINATION_NODE.
1087 c71a1a3d Iustin Pop
1088 c71a1a3d Iustin Pop
Removal
1089 c71a1a3d Iustin Pop
+++++++
1090 c71a1a3d Iustin Pop
1091 c71a1a3d Iustin Pop
Once a node no longer has any instances (neither primary nor secondary),
1092 c71a1a3d Iustin Pop
it's easy to remove it from the cluster::
1093 c71a1a3d Iustin Pop
1094 73225861 Iustin Pop
  $ gnt-node remove %NODE_NAME%
1095 c71a1a3d Iustin Pop
1096 c71a1a3d Iustin Pop
This will deconfigure the node, stop the ganeti daemons on it and leave
1097 c71a1a3d Iustin Pop
it hopefully like before it joined to the cluster.
1098 c71a1a3d Iustin Pop
1099 79829d23 Guido Trotter
Replication network changes
1100 79829d23 Guido Trotter
+++++++++++++++++++++++++++
1101 79829d23 Guido Trotter
1102 79829d23 Guido Trotter
The :command:`gnt-node modify -s` command can be used to change the
1103 79829d23 Guido Trotter
secondary IP of a node. This operation can only be performed if:
1104 79829d23 Guido Trotter
1105 79829d23 Guido Trotter
- No instance is active on the target node
1106 79829d23 Guido Trotter
- The new target IP is reachable from the master's secondary IP
1107 79829d23 Guido Trotter
1108 79829d23 Guido Trotter
Also this operation will not allow to change a node from single-homed
1109 79829d23 Guido Trotter
(same primary and secondary ip) to multi-homed (separate replication
1110 79829d23 Guido Trotter
network) or vice versa, unless:
1111 79829d23 Guido Trotter
1112 79829d23 Guido Trotter
- The target node is the master node and `--force` is passed.
1113 79829d23 Guido Trotter
- The target cluster is single-homed and the new primary ip is a change
1114 79829d23 Guido Trotter
  to single homed for a particular node.
1115 79829d23 Guido Trotter
- The target cluster is multi-homed and the new primary ip is a change
1116 79829d23 Guido Trotter
  to multi homed for a particular node.
1117 79829d23 Guido Trotter
1118 79829d23 Guido Trotter
For example to do a single-homed to multi-homed conversion::
1119 79829d23 Guido Trotter
1120 79829d23 Guido Trotter
  $ gnt-node modify --force -s %SECONDARY_IP% %MASTER_NAME%
1121 79829d23 Guido Trotter
  $ gnt-node modify -s %SECONDARY_IP% %NODE1_NAME%
1122 79829d23 Guido Trotter
  $ gnt-node modify -s %SECONDARY_IP% %NODE2_NAME%
1123 79829d23 Guido Trotter
  $ gnt-node modify -s %SECONDARY_IP% %NODE3_NAME%
1124 79829d23 Guido Trotter
  ...
1125 79829d23 Guido Trotter
1126 79829d23 Guido Trotter
The same commands can be used for multi-homed to single-homed except the
1127 79829d23 Guido Trotter
secondary IPs should be the same as the primaries for each node, for
1128 79829d23 Guido Trotter
that case.
1129 79829d23 Guido Trotter
1130 c71a1a3d Iustin Pop
Storage handling
1131 c71a1a3d Iustin Pop
++++++++++++++++
1132 c71a1a3d Iustin Pop
1133 c71a1a3d Iustin Pop
When using LVM (either standalone or with DRBD), it can become tedious
1134 c71a1a3d Iustin Pop
to debug and fix it in case of errors. Furthermore, even file-based
1135 c71a1a3d Iustin Pop
storage can become complicated to handle manually on many hosts. Ganeti
1136 c71a1a3d Iustin Pop
provides a couple of commands to help with automation.
1137 c71a1a3d Iustin Pop
1138 c71a1a3d Iustin Pop
Logical volumes
1139 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~
1140 c71a1a3d Iustin Pop
1141 c71a1a3d Iustin Pop
This is a command specific to LVM handling. It allows listing the
1142 c71a1a3d Iustin Pop
logical volumes on a given node or on all nodes and their association to
1143 c71a1a3d Iustin Pop
instances via the ``volumes`` command::
1144 c71a1a3d Iustin Pop
1145 73225861 Iustin Pop
  $ gnt-node volumes
1146 c71a1a3d Iustin Pop
  Node  PhysDev   VG    Name             Size Instance
1147 c71a1a3d Iustin Pop
  node1 /dev/sdb1 xenvg e61fbc97-….disk0 512M instance17
1148 c71a1a3d Iustin Pop
  node1 /dev/sdb1 xenvg ebd1a7d1-….disk0 512M instance19
1149 c71a1a3d Iustin Pop
  node2 /dev/sdb1 xenvg 0af08a3d-….disk0 512M instance20
1150 c71a1a3d Iustin Pop
  node2 /dev/sdb1 xenvg cc012285-….disk0 512M instance16
1151 c71a1a3d Iustin Pop
  node2 /dev/sdb1 xenvg f0fac192-….disk0 512M instance18
1152 c71a1a3d Iustin Pop
1153 c71a1a3d Iustin Pop
The above command maps each logical volume to a volume group and
1154 c71a1a3d Iustin Pop
underlying physical volume and (possibly) to an instance.
1155 c71a1a3d Iustin Pop
1156 c71a1a3d Iustin Pop
.. _storage-units-label:
1157 c71a1a3d Iustin Pop
1158 c71a1a3d Iustin Pop
Generalized storage handling
1159 c71a1a3d Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1160 c71a1a3d Iustin Pop
1161 c71a1a3d Iustin Pop
.. versionadded:: 2.1
1162 c71a1a3d Iustin Pop
1163 c71a1a3d Iustin Pop
Starting with Ganeti 2.1, a new storage framework has been implemented
1164 c71a1a3d Iustin Pop
that tries to abstract the handling of the storage type the cluster
1165 c71a1a3d Iustin Pop
uses.
1166 c71a1a3d Iustin Pop
1167 c71a1a3d Iustin Pop
First is listing the backend storage and their space situation::
1168 c71a1a3d Iustin Pop
1169 73225861 Iustin Pop
  $ gnt-node list-storage
1170 c71a1a3d Iustin Pop
  Node  Name        Size Used   Free
1171 c71a1a3d Iustin Pop
  node1 /dev/sda7 673.8G   0M 673.8G
1172 c71a1a3d Iustin Pop
  node1 /dev/sdb1 698.6G 1.5G 697.1G
1173 c71a1a3d Iustin Pop
  node2 /dev/sda7 673.8G   0M 673.8G
1174 c71a1a3d Iustin Pop
  node2 /dev/sdb1 698.6G 1.0G 697.6G
1175 c71a1a3d Iustin Pop
1176 c71a1a3d Iustin Pop
The default is to list LVM physical volumes. It's also possible to list
1177 c71a1a3d Iustin Pop
the LVM volume groups::
1178 c71a1a3d Iustin Pop
1179 73225861 Iustin Pop
  $ gnt-node list-storage -t lvm-vg
1180 c71a1a3d Iustin Pop
  Node  Name  Size
1181 c71a1a3d Iustin Pop
  node1 xenvg 1.3T
1182 c71a1a3d Iustin Pop
  node2 xenvg 1.3T
1183 c71a1a3d Iustin Pop
1184 c71a1a3d Iustin Pop
Next is repairing storage units, which is currently only implemented for
1185 c71a1a3d Iustin Pop
volume groups and does the equivalent of ``vgreduce --removemissing``::
1186 c71a1a3d Iustin Pop
1187 73225861 Iustin Pop
  $ gnt-node repair-storage %node2% lvm-vg xenvg
1188 c71a1a3d Iustin Pop
  Sun Oct 25 22:21:45 2009 Repairing storage unit 'xenvg' on node2 ...
1189 c71a1a3d Iustin Pop
1190 c71a1a3d Iustin Pop
Last is the modification of volume properties, which is (again) only
1191 c71a1a3d Iustin Pop
implemented for LVM physical volumes and allows toggling the
1192 c71a1a3d Iustin Pop
``allocatable`` value::
1193 c71a1a3d Iustin Pop
1194 73225861 Iustin Pop
  $ gnt-node modify-storage --allocatable=no %node2% lvm-pv /dev/%sdb1%
1195 c71a1a3d Iustin Pop
1196 c71a1a3d Iustin Pop
Use of the storage commands
1197 56c9a709 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1198 56c9a709 Iustin Pop
1199 c71a1a3d Iustin Pop
All these commands are needed when recovering a node from a disk
1200 c71a1a3d Iustin Pop
failure:
1201 c71a1a3d Iustin Pop
1202 c71a1a3d Iustin Pop
- first, we need to recover from complete LVM failure (due to missing
1203 c71a1a3d Iustin Pop
  disk), by running the ``repair-storage`` command
1204 c71a1a3d Iustin Pop
- second, we need to change allocation on any partially-broken disk
1205 c71a1a3d Iustin Pop
  (i.e. LVM still sees it, but it has bad blocks) by running
1206 c71a1a3d Iustin Pop
  ``modify-storage``
1207 c71a1a3d Iustin Pop
- then we can evacuate the instances as needed
1208 56c9a709 Iustin Pop
1209 56c9a709 Iustin Pop
1210 c71a1a3d Iustin Pop
Cluster operations
1211 c71a1a3d Iustin Pop
------------------
1212 c71a1a3d Iustin Pop
1213 c71a1a3d Iustin Pop
Beside the cluster initialisation command (which is detailed in the
1214 c71a1a3d Iustin Pop
:doc:`install` document) and the master failover command which is
1215 c71a1a3d Iustin Pop
explained under node handling, there are a couple of other cluster
1216 c71a1a3d Iustin Pop
operations available.
1217 c71a1a3d Iustin Pop
1218 c71a1a3d Iustin Pop
.. _cluster-config-label:
1219 c71a1a3d Iustin Pop
1220 c71a1a3d Iustin Pop
Standard operations
1221 c71a1a3d Iustin Pop
+++++++++++++++++++
1222 c71a1a3d Iustin Pop
1223 c71a1a3d Iustin Pop
One of the few commands that can be run on any node (not only the
1224 c71a1a3d Iustin Pop
master) is the ``getmaster`` command::
1225 c71a1a3d Iustin Pop
1226 73225861 Iustin Pop
  # on node2
1227 73225861 Iustin Pop
  $ gnt-cluster getmaster
1228 c71a1a3d Iustin Pop
  node1.example.com
1229 c71a1a3d Iustin Pop
1230 c71a1a3d Iustin Pop
It is possible to query and change global cluster parameters via the
1231 c71a1a3d Iustin Pop
``info`` and ``modify`` commands::
1232 c71a1a3d Iustin Pop
1233 73225861 Iustin Pop
  $ gnt-cluster info
1234 c71a1a3d Iustin Pop
  Cluster name: cluster.example.com
1235 c71a1a3d Iustin Pop
  Cluster UUID: 07805e6f-f0af-4310-95f1-572862ee939c
1236 c71a1a3d Iustin Pop
  Creation time: 2009-09-25 05:04:15
1237 c71a1a3d Iustin Pop
  Modification time: 2009-10-18 22:11:47
1238 c71a1a3d Iustin Pop
  Master node: node1.example.com
1239 c71a1a3d Iustin Pop
  Architecture (this node): 64bit (x86_64)
1240 c71a1a3d Iustin Pop
1241 c71a1a3d Iustin Pop
  Tags: foo
1242 c71a1a3d Iustin Pop
  Default hypervisor: xen-pvm
1243 c71a1a3d Iustin Pop
  Enabled hypervisors: xen-pvm
1244 c71a1a3d Iustin Pop
  Hypervisor parameters:
1245 c71a1a3d Iustin Pop
    - xen-pvm:
1246 c71a1a3d Iustin Pop
        root_path: /dev/sda1
1247 c71a1a3d Iustin Pop
1248 c71a1a3d Iustin Pop
  Cluster parameters:
1249 c71a1a3d Iustin Pop
    - candidate pool size: 10
1250 c71a1a3d Iustin Pop
1251 c71a1a3d Iustin Pop
  Default instance parameters:
1252 c71a1a3d Iustin Pop
    - default:
1253 c71a1a3d Iustin Pop
        memory: 128
1254 c71a1a3d Iustin Pop
1255 c71a1a3d Iustin Pop
  Default nic parameters:
1256 c71a1a3d Iustin Pop
    - default:
1257 c71a1a3d Iustin Pop
        link: xen-br0
1258 c71a1a3d Iustin Pop
1259 c71a1a3d Iustin Pop
1260 c71a1a3d Iustin Pop
There various parameters above can be changed via the ``modify``
1261 c71a1a3d Iustin Pop
commands as follows:
1262 c71a1a3d Iustin Pop
1263 c71a1a3d Iustin Pop
- the hypervisor parameters can be changed via ``modify -H
1264 c71a1a3d Iustin Pop
  xen-pvm:root_path=…``, and so on for other hypervisors/key/values
1265 c71a1a3d Iustin Pop
- the "default instance parameters" are changeable via ``modify -B
1266 c71a1a3d Iustin Pop
  parameter=value…`` syntax
1267 c71a1a3d Iustin Pop
- the cluster parameters are changeable via separate options to the
1268 c71a1a3d Iustin Pop
  modify command (e.g. ``--candidate-pool-size``, etc.)
1269 c71a1a3d Iustin Pop
1270 c71a1a3d Iustin Pop
For detailed option list see the :manpage:`gnt-cluster(8)` man page.
1271 c71a1a3d Iustin Pop
1272 c71a1a3d Iustin Pop
The cluster version can be obtained via the ``version`` command::
1273 73225861 Iustin Pop
  $ gnt-cluster version
1274 c71a1a3d Iustin Pop
  Software version: 2.1.0
1275 c71a1a3d Iustin Pop
  Internode protocol: 20
1276 c71a1a3d Iustin Pop
  Configuration format: 2010000
1277 c71a1a3d Iustin Pop
  OS api version: 15
1278 c71a1a3d Iustin Pop
  Export interface: 0
1279 c71a1a3d Iustin Pop
1280 c71a1a3d Iustin Pop
This is not very useful except when debugging Ganeti.
1281 c71a1a3d Iustin Pop
1282 c71a1a3d Iustin Pop
Global node commands
1283 c71a1a3d Iustin Pop
++++++++++++++++++++
1284 c71a1a3d Iustin Pop
1285 c71a1a3d Iustin Pop
There are two commands provided for replicating files to all nodes of a
1286 c71a1a3d Iustin Pop
cluster and for running commands on all the nodes::
1287 c71a1a3d Iustin Pop
1288 73225861 Iustin Pop
  $ gnt-cluster copyfile %/path/to/file%
1289 73225861 Iustin Pop
  $ gnt-cluster command %ls -l /path/to/file%
1290 c71a1a3d Iustin Pop
1291 c71a1a3d Iustin Pop
These are simple wrappers over scp/ssh and more advanced usage can be
1292 c71a1a3d Iustin Pop
obtained using :manpage:`dsh(1)` and similar commands. But they are
1293 c71a1a3d Iustin Pop
useful to update an OS script from the master node, for example.
1294 c71a1a3d Iustin Pop
1295 c71a1a3d Iustin Pop
Cluster verification
1296 c71a1a3d Iustin Pop
++++++++++++++++++++
1297 c71a1a3d Iustin Pop
1298 c71a1a3d Iustin Pop
There are three commands that relate to global cluster checks. The first
1299 c71a1a3d Iustin Pop
one is ``verify`` which gives an overview on the cluster state,
1300 c71a1a3d Iustin Pop
highlighting any issues. In normal operation, this command should return
1301 c71a1a3d Iustin Pop
no ``ERROR`` messages::
1302 c71a1a3d Iustin Pop
1303 73225861 Iustin Pop
  $ gnt-cluster verify
1304 c71a1a3d Iustin Pop
  Sun Oct 25 23:08:58 2009 * Verifying global settings
1305 c71a1a3d Iustin Pop
  Sun Oct 25 23:08:58 2009 * Gathering data (2 nodes)
1306 c71a1a3d Iustin Pop
  Sun Oct 25 23:09:00 2009 * Verifying node status
1307 c71a1a3d Iustin Pop
  Sun Oct 25 23:09:00 2009 * Verifying instance status
1308 c71a1a3d Iustin Pop
  Sun Oct 25 23:09:00 2009 * Verifying orphan volumes
1309 c71a1a3d Iustin Pop
  Sun Oct 25 23:09:00 2009 * Verifying remaining instances
1310 c71a1a3d Iustin Pop
  Sun Oct 25 23:09:00 2009 * Verifying N+1 Memory redundancy
1311 c71a1a3d Iustin Pop
  Sun Oct 25 23:09:00 2009 * Other Notes
1312 c71a1a3d Iustin Pop
  Sun Oct 25 23:09:00 2009   - NOTICE: 5 non-redundant instance(s) found.
1313 c71a1a3d Iustin Pop
  Sun Oct 25 23:09:00 2009 * Hooks Results
1314 c71a1a3d Iustin Pop
1315 c71a1a3d Iustin Pop
The second command is ``verify-disks``, which checks that the instance's
1316 c71a1a3d Iustin Pop
disks have the correct status based on the desired instance state
1317 c71a1a3d Iustin Pop
(up/down)::
1318 c71a1a3d Iustin Pop
1319 73225861 Iustin Pop
  $ gnt-cluster verify-disks
1320 c71a1a3d Iustin Pop
1321 c71a1a3d Iustin Pop
Note that this command will show no output when disks are healthy.
1322 c71a1a3d Iustin Pop
1323 c71a1a3d Iustin Pop
The last command is used to repair any discrepancies in Ganeti's
1324 c71a1a3d Iustin Pop
recorded disk size and the actual disk size (disk size information is
1325 c71a1a3d Iustin Pop
needed for proper activation and growth of DRBD-based disks)::
1326 c71a1a3d Iustin Pop
1327 73225861 Iustin Pop
  $ gnt-cluster repair-disk-sizes
1328 c71a1a3d Iustin Pop
  Sun Oct 25 23:13:16 2009  - INFO: Disk 0 of instance instance1 has mismatched size, correcting: recorded 512, actual 2048
1329 c71a1a3d Iustin Pop
  Sun Oct 25 23:13:17 2009  - WARNING: Invalid result from node node4, ignoring node results
1330 c71a1a3d Iustin Pop
1331 c71a1a3d Iustin Pop
The above shows one instance having wrong disk size, and a node which
1332 c71a1a3d Iustin Pop
returned invalid data, and thus we ignored all primary instances of that
1333 c71a1a3d Iustin Pop
node.
1334 c71a1a3d Iustin Pop
1335 c71a1a3d Iustin Pop
Configuration redistribution
1336 c71a1a3d Iustin Pop
++++++++++++++++++++++++++++
1337 c71a1a3d Iustin Pop
1338 c71a1a3d Iustin Pop
If the verify command complains about file mismatches between the master
1339 c71a1a3d Iustin Pop
and other nodes, due to some node problems or if you manually modified
1340 c71a1a3d Iustin Pop
configuration files, you can force an push of the master configuration
1341 c71a1a3d Iustin Pop
to all other nodes via the ``redist-conf`` command::
1342 c71a1a3d Iustin Pop
1343 73225861 Iustin Pop
  $ gnt-cluster redist-conf
1344 c71a1a3d Iustin Pop
1345 c71a1a3d Iustin Pop
This command will be silent unless there are problems sending updates to
1346 c71a1a3d Iustin Pop
the other nodes.
1347 c71a1a3d Iustin Pop
1348 c71a1a3d Iustin Pop
1349 c71a1a3d Iustin Pop
Cluster renaming
1350 c71a1a3d Iustin Pop
++++++++++++++++
1351 c71a1a3d Iustin Pop
1352 c71a1a3d Iustin Pop
It is possible to rename a cluster, or to change its IP address, via the
1353 c71a1a3d Iustin Pop
``rename`` command. If only the IP has changed, you need to pass the
1354 c71a1a3d Iustin Pop
current name and Ganeti will realise its IP has changed::
1355 c71a1a3d Iustin Pop
1356 73225861 Iustin Pop
  $ gnt-cluster rename %cluster.example.com%
1357 c71a1a3d Iustin Pop
  This will rename the cluster to 'cluster.example.com'. If
1358 c71a1a3d Iustin Pop
  you are connected over the network to the cluster name, the operation
1359 c71a1a3d Iustin Pop
  is very dangerous as the IP address will be removed from the node and
1360 c71a1a3d Iustin Pop
  the change may not go through. Continue?
1361 73225861 Iustin Pop
  y/[n]/?: %y%
1362 c71a1a3d Iustin Pop
  Failure: prerequisites not met for this operation:
1363 c71a1a3d Iustin Pop
  Neither the name nor the IP address of the cluster has changed
1364 c71a1a3d Iustin Pop
1365 c71a1a3d Iustin Pop
In the above output, neither value has changed since the cluster
1366 c71a1a3d Iustin Pop
initialisation so the operation is not completed.
1367 c71a1a3d Iustin Pop
1368 c71a1a3d Iustin Pop
Queue operations
1369 c71a1a3d Iustin Pop
++++++++++++++++
1370 c71a1a3d Iustin Pop
1371 c71a1a3d Iustin Pop
The job queue execution in Ganeti 2.0 and higher can be inspected,
1372 c71a1a3d Iustin Pop
suspended and resumed via the ``queue`` command::
1373 c71a1a3d Iustin Pop
1374 73225861 Iustin Pop
  $ gnt-cluster queue info
1375 c71a1a3d Iustin Pop
  The drain flag is unset
1376 73225861 Iustin Pop
  $ gnt-cluster queue drain
1377 73225861 Iustin Pop
  $ gnt-instance stop %instance1%
1378 c71a1a3d Iustin Pop
  Failed to submit job for instance1: Job queue is drained, refusing job
1379 73225861 Iustin Pop
  $ gnt-cluster queue info
1380 c71a1a3d Iustin Pop
  The drain flag is set
1381 73225861 Iustin Pop
  $ gnt-cluster queue undrain
1382 c71a1a3d Iustin Pop
1383 c71a1a3d Iustin Pop
This is most useful if you have an active cluster and you need to
1384 c71a1a3d Iustin Pop
upgrade the Ganeti software, or simply restart the software on any node:
1385 c71a1a3d Iustin Pop
1386 c71a1a3d Iustin Pop
#. suspend the queue via ``queue drain``
1387 c71a1a3d Iustin Pop
#. wait until there are no more running jobs via ``gnt-job list``
1388 c71a1a3d Iustin Pop
#. restart the master or another node, or upgrade the software
1389 c71a1a3d Iustin Pop
#. resume the queue via ``queue undrain``
1390 c71a1a3d Iustin Pop
1391 c71a1a3d Iustin Pop
.. note:: this command only stores a local flag file, and if you
1392 c71a1a3d Iustin Pop
   failover the master, it will not have effect on the new master.
1393 c71a1a3d Iustin Pop
1394 c71a1a3d Iustin Pop
1395 c71a1a3d Iustin Pop
Watcher control
1396 c71a1a3d Iustin Pop
+++++++++++++++
1397 c71a1a3d Iustin Pop
1398 22ac4136 Michael Hanselmann
The :manpage:`ganeti-watcher(8)` is a program, usually scheduled via
1399 c71a1a3d Iustin Pop
``cron``, that takes care of cluster maintenance operations (restarting
1400 c71a1a3d Iustin Pop
downed instances, activating down DRBD disks, etc.). However, during
1401 c71a1a3d Iustin Pop
maintenance and troubleshooting, this can get in your way; disabling it
1402 c71a1a3d Iustin Pop
via commenting out the cron job is not so good as this can be
1403 c71a1a3d Iustin Pop
forgotten. Thus there are some commands for automated control of the
1404 c71a1a3d Iustin Pop
watcher: ``pause``, ``info`` and ``continue``::
1405 c71a1a3d Iustin Pop
1406 73225861 Iustin Pop
  $ gnt-cluster watcher info
1407 c71a1a3d Iustin Pop
  The watcher is not paused.
1408 73225861 Iustin Pop
  $ gnt-cluster watcher pause %1h%
1409 c71a1a3d Iustin Pop
  The watcher is paused until Mon Oct 26 00:30:37 2009.
1410 73225861 Iustin Pop
  $ gnt-cluster watcher info
1411 c71a1a3d Iustin Pop
  The watcher is paused until Mon Oct 26 00:30:37 2009.
1412 73225861 Iustin Pop
  $ ganeti-watcher -d
1413 c71a1a3d Iustin Pop
  2009-10-25 23:30:47,984:  pid=28867 ganeti-watcher:486 DEBUG Pause has been set, exiting
1414 73225861 Iustin Pop
  $ gnt-cluster watcher continue
1415 c71a1a3d Iustin Pop
  The watcher is no longer paused.
1416 73225861 Iustin Pop
  $ ganeti-watcher -d
1417 c71a1a3d Iustin Pop
  2009-10-25 23:31:04,789:  pid=28976 ganeti-watcher:345 DEBUG Archived 0 jobs, left 0
1418 c71a1a3d Iustin Pop
  2009-10-25 23:31:05,884:  pid=28976 ganeti-watcher:280 DEBUG Got data from cluster, writing instance status file
1419 c71a1a3d Iustin Pop
  2009-10-25 23:31:06,061:  pid=28976 ganeti-watcher:150 DEBUG Data didn't change, just touching status file
1420 73225861 Iustin Pop
  $ gnt-cluster watcher info
1421 c71a1a3d Iustin Pop
  The watcher is not paused.
1422 c71a1a3d Iustin Pop
1423 c71a1a3d Iustin Pop
The exact details of the argument to the ``pause`` command are available
1424 c71a1a3d Iustin Pop
in the manpage.
1425 c71a1a3d Iustin Pop
1426 c71a1a3d Iustin Pop
.. note:: this command only stores a local flag file, and if you
1427 c71a1a3d Iustin Pop
   failover the master, it will not have effect on the new master.
1428 c71a1a3d Iustin Pop
1429 6328fea3 Iustin Pop
Node auto-maintenance
1430 6328fea3 Iustin Pop
+++++++++++++++++++++
1431 6328fea3 Iustin Pop
1432 6328fea3 Iustin Pop
If the cluster parameter ``maintain_node_health`` is enabled (see the
1433 6328fea3 Iustin Pop
manpage for :command:`gnt-cluster`, the init and modify subcommands),
1434 6328fea3 Iustin Pop
then the following will happen automatically:
1435 6328fea3 Iustin Pop
1436 6328fea3 Iustin Pop
- the watcher will shutdown any instances running on offline nodes
1437 6328fea3 Iustin Pop
- the watcher will deactivate any DRBD devices on offline nodes
1438 6328fea3 Iustin Pop
1439 6328fea3 Iustin Pop
In the future, more actions are planned, so only enable this parameter
1440 6328fea3 Iustin Pop
if the nodes are completely dedicated to Ganeti; otherwise it might be
1441 6328fea3 Iustin Pop
possible to lose data due to auto-maintenance actions.
1442 6328fea3 Iustin Pop
1443 c71a1a3d Iustin Pop
Removing a cluster entirely
1444 c71a1a3d Iustin Pop
+++++++++++++++++++++++++++
1445 c71a1a3d Iustin Pop
1446 c71a1a3d Iustin Pop
The usual method to cleanup a cluster is to run ``gnt-cluster destroy``
1447 c71a1a3d Iustin Pop
however if the Ganeti installation is broken in any way then this will
1448 c71a1a3d Iustin Pop
not run.
1449 c71a1a3d Iustin Pop
1450 c71a1a3d Iustin Pop
It is possible in such a case to cleanup manually most if not all traces
1451 c71a1a3d Iustin Pop
of a cluster installation by following these steps on all of the nodes:
1452 c71a1a3d Iustin Pop
1453 c71a1a3d Iustin Pop
1. Shutdown all instances. This depends on the virtualisation method
1454 c71a1a3d Iustin Pop
   used (Xen, KVM, etc.):
1455 56c9a709 Iustin Pop
1456 56c9a709 Iustin Pop
  - Xen: run ``xm list`` and ``xm destroy`` on all the non-Domain-0
1457 56c9a709 Iustin Pop
    instances
1458 56c9a709 Iustin Pop
  - KVM: kill all the KVM processes
1459 56c9a709 Iustin Pop
  - chroot: kill all processes under the chroot mountpoints
1460 56c9a709 Iustin Pop
1461 c71a1a3d Iustin Pop
2. If using DRBD, shutdown all DRBD minors (which should by at this time
1462 c71a1a3d Iustin Pop
   no-longer in use by instances); on each node, run ``drbdsetup
1463 56c9a709 Iustin Pop
   /dev/drbdN down`` for each active DRBD minor.
1464 56c9a709 Iustin Pop
1465 c71a1a3d Iustin Pop
3. If using LVM, cleanup the Ganeti volume group; if only Ganeti created
1466 c71a1a3d Iustin Pop
   logical volumes (and you are not sharing the volume group with the
1467 c71a1a3d Iustin Pop
   OS, for example), then simply running ``lvremove -f xenvg`` (replace
1468 c71a1a3d Iustin Pop
   'xenvg' with your volume group name) should do the required cleanup.
1469 56c9a709 Iustin Pop
1470 56c9a709 Iustin Pop
4. If using file-based storage, remove recursively all files and
1471 56c9a709 Iustin Pop
   directories under your file-storage directory: ``rm -rf
1472 c71a1a3d Iustin Pop
   /srv/ganeti/file-storage/*`` replacing the path with the correct path
1473 c71a1a3d Iustin Pop
   for your cluster.
1474 56c9a709 Iustin Pop
1475 56c9a709 Iustin Pop
5. Stop the ganeti daemons (``/etc/init.d/ganeti stop``) and kill any
1476 56c9a709 Iustin Pop
   that remain alive (``pgrep ganeti`` and ``pkill ganeti``).
1477 56c9a709 Iustin Pop
1478 56c9a709 Iustin Pop
6. Remove the ganeti state directory (``rm -rf /var/lib/ganeti/*``),
1479 56c9a709 Iustin Pop
   replacing the path with the correct path for your installation.
1480 56c9a709 Iustin Pop
1481 7ed400f0 Stratos Psomadakis
7. If using RBD, run ``rbd unmap /dev/rbdN`` to unmap the RBD disks.
1482 7ed400f0 Stratos Psomadakis
   Then remove the RBD disk images used by Ganeti, identified by their
1483 7ed400f0 Stratos Psomadakis
   UUIDs (``rbd rm uuid.rbd.diskN``).
1484 7ed400f0 Stratos Psomadakis
1485 56c9a709 Iustin Pop
On the master node, remove the cluster from the master-netdev (usually
1486 c71a1a3d Iustin Pop
``xen-br0`` for bridged mode, otherwise ``eth0`` or similar), by running
1487 c71a1a3d Iustin Pop
``ip a del $clusterip/32 dev xen-br0`` (use the correct cluster ip and
1488 c71a1a3d Iustin Pop
network device name).
1489 56c9a709 Iustin Pop
1490 56c9a709 Iustin Pop
At this point, the machines are ready for a cluster creation; in case
1491 c71a1a3d Iustin Pop
you want to remove Ganeti completely, you need to also undo some of the
1492 c71a1a3d Iustin Pop
SSH changes and log directories:
1493 56c9a709 Iustin Pop
1494 7faf5110 Michael Hanselmann
- ``rm -rf /var/log/ganeti /srv/ganeti`` (replace with the correct
1495 7faf5110 Michael Hanselmann
  paths)
1496 c71a1a3d Iustin Pop
- remove from ``/root/.ssh`` the keys that Ganeti added (check the
1497 c71a1a3d Iustin Pop
  ``authorized_keys`` and ``id_dsa`` files)
1498 56c9a709 Iustin Pop
- regenerate the host's SSH keys (check the OpenSSH startup scripts)
1499 56c9a709 Iustin Pop
- uninstall Ganeti
1500 56c9a709 Iustin Pop
1501 56c9a709 Iustin Pop
Otherwise, if you plan to re-create the cluster, you can just go ahead
1502 56c9a709 Iustin Pop
and rerun ``gnt-cluster init``.
1503 558fd122 Michael Hanselmann
1504 bced76fd Jose A. Lopes
Replacing the SSH and SSL keys
1505 bced76fd Jose A. Lopes
++++++++++++++++++++++++++++++
1506 bced76fd Jose A. Lopes
1507 bced76fd Jose A. Lopes
Ganeti uses both SSL and SSH keys, and actively modifies the SSH keys on
1508 bced76fd Jose A. Lopes
the nodes.  As result, in order to replace these keys, a few extra steps
1509 bced76fd Jose A. Lopes
need to be followed: :doc:`cluster-keys-replacement`
1510 bced76fd Jose A. Lopes
1511 ac0af025 Michele Tartara
Monitoring the cluster
1512 ac0af025 Michele Tartara
----------------------
1513 ac0af025 Michele Tartara
1514 ac0af025 Michele Tartara
Starting with Ganeti 2.8, a monitoring daemon is available, providing
1515 ac0af025 Michele Tartara
information about the status and the performance of the system.
1516 ac0af025 Michele Tartara
1517 ac0af025 Michele Tartara
The monitoring daemon runs on every node, listening on TCP port 1815. Each
1518 ac0af025 Michele Tartara
instance of the daemon provides information related to the node it is running
1519 ac0af025 Michele Tartara
on.
1520 ac0af025 Michele Tartara
1521 ac0af025 Michele Tartara
.. include:: monitoring-query-format.rst
1522 ac0af025 Michele Tartara
1523 c71a1a3d Iustin Pop
Tags handling
1524 c71a1a3d Iustin Pop
-------------
1525 c71a1a3d Iustin Pop
1526 c71a1a3d Iustin Pop
The tags handling (addition, removal, listing) is similar for all the
1527 c71a1a3d Iustin Pop
objects that support it (instances, nodes, and the cluster).
1528 c71a1a3d Iustin Pop
1529 c71a1a3d Iustin Pop
Limitations
1530 c71a1a3d Iustin Pop
+++++++++++
1531 c71a1a3d Iustin Pop
1532 c71a1a3d Iustin Pop
Note that the set of characters present in a tag and the maximum tag
1533 c71a1a3d Iustin Pop
length are restricted. Currently the maximum length is 128 characters,
1534 c71a1a3d Iustin Pop
there can be at most 4096 tags per object, and the set of characters is
1535 bde65914 Iustin Pop
comprised by alphanumeric characters and additionally ``.+*/:@-``.
1536 c71a1a3d Iustin Pop
1537 c71a1a3d Iustin Pop
Operations
1538 c71a1a3d Iustin Pop
++++++++++
1539 c71a1a3d Iustin Pop
1540 c71a1a3d Iustin Pop
Tags can be added via ``add-tags``::
1541 c71a1a3d Iustin Pop
1542 73225861 Iustin Pop
  $ gnt-instance add-tags %INSTANCE% %a% %b% %c%
1543 73225861 Iustin Pop
  $ gnt-node add-tags %INSTANCE% %a% %b% %c%
1544 73225861 Iustin Pop
  $ gnt-cluster add-tags %a% %b% %c%
1545 c71a1a3d Iustin Pop
1546 c71a1a3d Iustin Pop
1547 c71a1a3d Iustin Pop
The above commands add three tags to an instance, to a node and to the
1548 c71a1a3d Iustin Pop
cluster. Note that the cluster command only takes tags as arguments,
1549 c71a1a3d Iustin Pop
whereas the node and instance commands first required the node and
1550 c71a1a3d Iustin Pop
instance name.
1551 c71a1a3d Iustin Pop
1552 c71a1a3d Iustin Pop
Tags can also be added from a file, via the ``--from=FILENAME``
1553 c71a1a3d Iustin Pop
argument. The file is expected to contain one tag per line.
1554 c71a1a3d Iustin Pop
1555 c71a1a3d Iustin Pop
Tags can also be remove via a syntax very similar to the add one::
1556 c71a1a3d Iustin Pop
1557 73225861 Iustin Pop
  $ gnt-instance remove-tags %INSTANCE% %a% %b% %c%
1558 c71a1a3d Iustin Pop
1559 c71a1a3d Iustin Pop
And listed via::
1560 c71a1a3d Iustin Pop
1561 73225861 Iustin Pop
  $ gnt-instance list-tags
1562 73225861 Iustin Pop
  $ gnt-node list-tags
1563 73225861 Iustin Pop
  $ gnt-cluster list-tags
1564 c71a1a3d Iustin Pop
1565 c71a1a3d Iustin Pop
Global tag search
1566 c71a1a3d Iustin Pop
+++++++++++++++++
1567 c71a1a3d Iustin Pop
1568 c71a1a3d Iustin Pop
It is also possible to execute a global search on the all tags defined
1569 c71a1a3d Iustin Pop
in the cluster configuration, via a cluster command::
1570 c71a1a3d Iustin Pop
1571 73225861 Iustin Pop
  $ gnt-cluster search-tags %REGEXP%
1572 c71a1a3d Iustin Pop
1573 c71a1a3d Iustin Pop
The parameter expected is a regular expression (see
1574 c71a1a3d Iustin Pop
:manpage:`regex(7)`). This will return all tags that match the search,
1575 c71a1a3d Iustin Pop
together with the object they are defined in (the names being show in a
1576 c71a1a3d Iustin Pop
hierarchical kind of way)::
1577 c71a1a3d Iustin Pop
1578 73225861 Iustin Pop
  $ gnt-cluster search-tags %o%
1579 c71a1a3d Iustin Pop
  /cluster foo
1580 c71a1a3d Iustin Pop
  /instances/instance1 owner:bar
1581 c71a1a3d Iustin Pop
1582 ee414f1c Michele Tartara
Autorepair
1583 ee414f1c Michele Tartara
----------
1584 ee414f1c Michele Tartara
1585 ee414f1c Michele Tartara
The tool ``harep`` can be used to automatically fix some problems that are
1586 ee414f1c Michele Tartara
present in the cluster.
1587 ee414f1c Michele Tartara
1588 ee414f1c Michele Tartara
It is mainly meant to be regularly and automatically executed
1589 ee414f1c Michele Tartara
as a cron job. This is quite evident by considering that, when executed, it does
1590 ee414f1c Michele Tartara
not immediately fix all the issues of the instances of the cluster, but it
1591 ee414f1c Michele Tartara
cycles the instances through a series of states, one at every ``harep``
1592 ee414f1c Michele Tartara
execution. Every state performs a step towards the resolution of the problem.
1593 ee414f1c Michele Tartara
This process goes on until the instance is brought back to the healthy state,
1594 ee414f1c Michele Tartara
or the tool realizes that it is not able to fix the instance, and
1595 ee414f1c Michele Tartara
therefore marks it as in failure state.
1596 ee414f1c Michele Tartara
1597 ee414f1c Michele Tartara
Allowing harep to act on the cluster
1598 ee414f1c Michele Tartara
++++++++++++++++++++++++++++++++++++
1599 ee414f1c Michele Tartara
1600 ee414f1c Michele Tartara
By default, ``harep`` checks the status of the cluster but it is not allowed to
1601 ee414f1c Michele Tartara
perform any modification. Modification must be explicitly allowed by an
1602 ee414f1c Michele Tartara
appropriate use of tags. Tagging can be applied at various levels, and can
1603 ee414f1c Michele Tartara
enable different kinds of autorepair, as hereafter described.
1604 ee414f1c Michele Tartara
1605 ee414f1c Michele Tartara
All the tags that authorize ``harep`` to perform modifications follow this
1606 ee414f1c Michele Tartara
syntax::
1607 ee414f1c Michele Tartara
1608 ee414f1c Michele Tartara
  ganeti:watcher:autorepair:<type>
1609 ee414f1c Michele Tartara
1610 ee414f1c Michele Tartara
where ``<type>`` indicates the kind of intervention that can be performed. Every
1611 ee414f1c Michele Tartara
possible value of ``<type>`` includes at least all the authorization of the
1612 ee414f1c Michele Tartara
previous one, plus its own. The possible values, in increasing order of
1613 ee414f1c Michele Tartara
severity, are:
1614 ee414f1c Michele Tartara
1615 ee414f1c Michele Tartara
- ``fix-storage`` allows a disk replacement or another operation that
1616 ee414f1c Michele Tartara
  fixes the instance backend storage without affecting the instance
1617 ee414f1c Michele Tartara
  itself. This can for example recover from a broken drbd secondary, but
1618 ee414f1c Michele Tartara
  risks data loss if something is wrong on the primary but the secondary
1619 ee414f1c Michele Tartara
  was somehow recoverable.
1620 ee414f1c Michele Tartara
- ``migrate`` allows an instance migration. This can recover from a
1621 ee414f1c Michele Tartara
  drained primary, but can cause an instance crash in some cases (bugs).
1622 ee414f1c Michele Tartara
- ``failover`` allows instance reboot on the secondary. This can recover
1623 ee414f1c Michele Tartara
  from an offline primary, but the instance will lose its running state.
1624 ee414f1c Michele Tartara
- ``reinstall`` allows disks to be recreated and an instance to be
1625 ee414f1c Michele Tartara
  reinstalled. This can recover from primary&secondary both being
1626 ee414f1c Michele Tartara
  offline, or from an offline primary in the case of non-redundant
1627 ee414f1c Michele Tartara
  instances. It causes data loss.
1628 ee414f1c Michele Tartara
1629 ee414f1c Michele Tartara
These autorepair tags can be applied to a cluster, a nodegroup or an instance,
1630 ee414f1c Michele Tartara
and will act where they are applied and to everything in the entities sub-tree
1631 ee414f1c Michele Tartara
(e.g. a tag applied to a nodegroup will apply to all the instances contained in
1632 ee414f1c Michele Tartara
that nodegroup, but not to the rest of the cluster).
1633 ee414f1c Michele Tartara
1634 ee414f1c Michele Tartara
If there are multiple ``ganeti:watcher:autorepair:<type>`` tags in an
1635 ee414f1c Michele Tartara
object (cluster, node group or instance), the least destructive tag
1636 ee414f1c Michele Tartara
takes precedence. When multiplicity happens across objects, the nearest
1637 ee414f1c Michele Tartara
tag wins. For example, if in a cluster with two instances, *I1* and
1638 ee414f1c Michele Tartara
*I2*, *I1* has ``failover``, and the cluster itself has both
1639 ee414f1c Michele Tartara
``fix-storage`` and ``reinstall``, *I1* will end up with ``failover``
1640 ee414f1c Michele Tartara
and *I2* with ``fix-storage``.
1641 ee414f1c Michele Tartara
1642 ee414f1c Michele Tartara
Limiting harep
1643 ee414f1c Michele Tartara
++++++++++++++
1644 ee414f1c Michele Tartara
1645 ee414f1c Michele Tartara
Sometimes it is useful to stop harep from performing its task temporarily,
1646 ee414f1c Michele Tartara
and it is useful to be able to do so without distrupting its configuration, that
1647 ee414f1c Michele Tartara
is, without removing the authorization tags. In order to do this, suspend tags
1648 ee414f1c Michele Tartara
are provided.
1649 ee414f1c Michele Tartara
1650 ee414f1c Michele Tartara
Suspend tags can be added to cluster, nodegroup or instances, and act on the
1651 ee414f1c Michele Tartara
entire entities sub-tree. No operation will be performed by ``harep`` on the
1652 ee414f1c Michele Tartara
instances protected by a suspend tag. Their syntax is as follows::
1653 ee414f1c Michele Tartara
1654 ee414f1c Michele Tartara
  ganeti:watcher:autorepair:suspend[:<timestamp>]
1655 ee414f1c Michele Tartara
1656 ee414f1c Michele Tartara
If there are multiple suspend tags in an object, the form without timestamp
1657 ee414f1c Michele Tartara
takes precedence (permanent suspension); or, if all object tags have a
1658 ee414f1c Michele Tartara
timestamp, the one with the highest timestamp.
1659 ee414f1c Michele Tartara
1660 ee414f1c Michele Tartara
Tags with a timestamp will be automatically removed when the time indicated by
1661 ee414f1c Michele Tartara
the timestamp is passed. Indefinite suspension tags have to be removed manually.
1662 ee414f1c Michele Tartara
1663 ee414f1c Michele Tartara
Result reporting
1664 ee414f1c Michele Tartara
++++++++++++++++
1665 ee414f1c Michele Tartara
1666 ee414f1c Michele Tartara
Harep will report about the result of its actions both through its CLI, and by
1667 ee414f1c Michele Tartara
adding tags to the instances it operated on. Such tags will follow the syntax
1668 ee414f1c Michele Tartara
hereby described::
1669 ee414f1c Michele Tartara
1670 ee414f1c Michele Tartara
  ganeti:watcher:autorepair:result:<type>:<id>:<timestamp>:<result>:<jobs>
1671 ee414f1c Michele Tartara
1672 ee414f1c Michele Tartara
If this tag is present a repair of type ``type`` has been performed on
1673 ee414f1c Michele Tartara
the instance and has been completed by ``timestamp``. The result is
1674 ee414f1c Michele Tartara
either ``success``, ``failure`` or ``enoperm``, and jobs is a
1675 ee414f1c Michele Tartara
*+*-separated list of jobs that were executed for this repair.
1676 ee414f1c Michele Tartara
1677 ee414f1c Michele Tartara
An ``enoperm`` result is an error state due to permission problems. It
1678 ee414f1c Michele Tartara
is returned when the repair cannot proceed because it would require to perform
1679 ee414f1c Michele Tartara
an operation that is not allowed by the ``ganeti:watcher:autorepair:<type>`` tag
1680 ee414f1c Michele Tartara
that is defining the instance autorepair permissions.
1681 ee414f1c Michele Tartara
1682 ee414f1c Michele Tartara
NB: if an instance repair ends up in a failure state, it will not be touched
1683 ee414f1c Michele Tartara
again by ``harep`` until it has been manually fixed by the system administrator
1684 ee414f1c Michele Tartara
and the ``ganeti:watcher:autorepair:result:failure:*`` tag has been manually
1685 ee414f1c Michele Tartara
removed.
1686 c71a1a3d Iustin Pop
1687 c71a1a3d Iustin Pop
Job operations
1688 c71a1a3d Iustin Pop
--------------
1689 c71a1a3d Iustin Pop
1690 c71a1a3d Iustin Pop
The various jobs submitted by the instance/node/cluster commands can be
1691 c71a1a3d Iustin Pop
examined, canceled and archived by various invocations of the
1692 c71a1a3d Iustin Pop
``gnt-job`` command.
1693 c71a1a3d Iustin Pop
1694 c71a1a3d Iustin Pop
First is the job list command::
1695 c71a1a3d Iustin Pop
1696 73225861 Iustin Pop
  $ gnt-job list
1697 c71a1a3d Iustin Pop
  17771 success INSTANCE_QUERY_DATA
1698 c71a1a3d Iustin Pop
  17773 success CLUSTER_VERIFY_DISKS
1699 c71a1a3d Iustin Pop
  17775 success CLUSTER_REPAIR_DISK_SIZES
1700 c71a1a3d Iustin Pop
  17776 error   CLUSTER_RENAME(cluster.example.com)
1701 c71a1a3d Iustin Pop
  17780 success CLUSTER_REDIST_CONF
1702 c71a1a3d Iustin Pop
  17792 success INSTANCE_REBOOT(instance1.example.com)
1703 c71a1a3d Iustin Pop
1704 c71a1a3d Iustin Pop
More detailed information about a job can be found via the ``info``
1705 c71a1a3d Iustin Pop
command::
1706 c71a1a3d Iustin Pop
1707 73225861 Iustin Pop
  $ gnt-job info %17776%
1708 c71a1a3d Iustin Pop
  Job ID: 17776
1709 c71a1a3d Iustin Pop
    Status: error
1710 c71a1a3d Iustin Pop
    Received:         2009-10-25 23:18:02.180569
1711 c71a1a3d Iustin Pop
    Processing start: 2009-10-25 23:18:02.200335 (delta 0.019766s)
1712 c71a1a3d Iustin Pop
    Processing end:   2009-10-25 23:18:02.279743 (delta 0.079408s)
1713 c71a1a3d Iustin Pop
    Total processing time: 0.099174 seconds
1714 c71a1a3d Iustin Pop
    Opcodes:
1715 c71a1a3d Iustin Pop
      OP_CLUSTER_RENAME
1716 c71a1a3d Iustin Pop
        Status: error
1717 c71a1a3d Iustin Pop
        Processing start: 2009-10-25 23:18:02.200335
1718 c71a1a3d Iustin Pop
        Processing end:   2009-10-25 23:18:02.252282
1719 c71a1a3d Iustin Pop
        Input fields:
1720 c71a1a3d Iustin Pop
          name: cluster.example.com
1721 c71a1a3d Iustin Pop
        Result:
1722 c71a1a3d Iustin Pop
          OpPrereqError
1723 c71a1a3d Iustin Pop
          [Neither the name nor the IP address of the cluster has changed]
1724 c71a1a3d Iustin Pop
        Execution log:
1725 c71a1a3d Iustin Pop
1726 c71a1a3d Iustin Pop
During the execution of a job, it's possible to follow the output of a
1727 c71a1a3d Iustin Pop
job, similar to the log that one get from the ``gnt-`` commands, via the
1728 c71a1a3d Iustin Pop
watch command::
1729 c71a1a3d Iustin Pop
1730 73225861 Iustin Pop
  $ gnt-instance add --submit … %instance1%
1731 c71a1a3d Iustin Pop
  JobID: 17818
1732 73225861 Iustin Pop
  $ gnt-job watch %17818%
1733 c71a1a3d Iustin Pop
  Output from job 17818 follows
1734 c71a1a3d Iustin Pop
  -----------------------------
1735 c71a1a3d Iustin Pop
  Mon Oct 26 00:22:48 2009  - INFO: Selected nodes for instance instance1 via iallocator dumb: node1, node2
1736 c71a1a3d Iustin Pop
  Mon Oct 26 00:22:49 2009 * creating instance disks...
1737 c71a1a3d Iustin Pop
  Mon Oct 26 00:22:52 2009 adding instance instance1 to cluster config
1738 c71a1a3d Iustin Pop
  Mon Oct 26 00:22:52 2009  - INFO: Waiting for instance instance1 to sync disks.
1739 c71a1a3d Iustin Pop
1740 e0897adf Michael Hanselmann
  Mon Oct 26 00:23:03 2009 creating os for instance instance1 on node node1
1741 c71a1a3d Iustin Pop
  Mon Oct 26 00:23:03 2009 * running the instance OS create scripts...
1742 c71a1a3d Iustin Pop
  Mon Oct 26 00:23:13 2009 * starting instance...
1743 73225861 Iustin Pop
  $
1744 c71a1a3d Iustin Pop
1745 c71a1a3d Iustin Pop
This is useful if you need to follow a job's progress from multiple
1746 c71a1a3d Iustin Pop
terminals.
1747 c71a1a3d Iustin Pop
1748 c71a1a3d Iustin Pop
A job that has not yet started to run can be canceled::
1749 c71a1a3d Iustin Pop
1750 73225861 Iustin Pop
  $ gnt-job cancel %17810%
1751 c71a1a3d Iustin Pop
1752 c71a1a3d Iustin Pop
But not one that has already started execution::
1753 c71a1a3d Iustin Pop
1754 73225861 Iustin Pop
  $ gnt-job cancel %17805%
1755 c71a1a3d Iustin Pop
  Job 17805 is no longer waiting in the queue
1756 c71a1a3d Iustin Pop
1757 c71a1a3d Iustin Pop
There are two queues for jobs: the *current* and the *archive*
1758 c71a1a3d Iustin Pop
queue. Jobs are initially submitted to the current queue, and they stay
1759 c71a1a3d Iustin Pop
in that queue until they have finished execution (either successfully or
1760 89907375 Michael Hanselmann
not). At that point, they can be moved into the archive queue using e.g.
1761 89907375 Michael Hanselmann
``gnt-job autoarchive all``. The ``ganeti-watcher`` script will do this
1762 89907375 Michael Hanselmann
automatically 6 hours after a job is finished. The ``ganeti-cleaner``
1763 89907375 Michael Hanselmann
script will then remove archived the jobs from the archive directory
1764 c71a1a3d Iustin Pop
after three weeks.
1765 c71a1a3d Iustin Pop
1766 89907375 Michael Hanselmann
Note that ``gnt-job list`` only shows jobs in the current queue.
1767 89907375 Michael Hanselmann
Archived jobs can be viewed using ``gnt-job info <id>``.
1768 c71a1a3d Iustin Pop
1769 bde65914 Iustin Pop
Special Ganeti deployments
1770 bde65914 Iustin Pop
--------------------------
1771 bde65914 Iustin Pop
1772 bde65914 Iustin Pop
Since Ganeti 2.4, it is possible to extend the Ganeti deployment with
1773 bde65914 Iustin Pop
two custom scenarios: Ganeti inside Ganeti and multi-site model.
1774 bde65914 Iustin Pop
1775 bde65914 Iustin Pop
Running Ganeti under Ganeti
1776 bde65914 Iustin Pop
+++++++++++++++++++++++++++
1777 bde65914 Iustin Pop
1778 bde65914 Iustin Pop
It is sometimes useful to be able to use a Ganeti instance as a Ganeti
1779 bde65914 Iustin Pop
node (part of another cluster, usually). One example scenario is two
1780 bde65914 Iustin Pop
small clusters, where we want to have an additional master candidate
1781 bde65914 Iustin Pop
that holds the cluster configuration and can be used for helping with
1782 bde65914 Iustin Pop
the master voting process.
1783 bde65914 Iustin Pop
1784 bde65914 Iustin Pop
However, these Ganeti instance should not host instances themselves, and
1785 bde65914 Iustin Pop
should not be considered in the normal capacity planning, evacuation
1786 bde65914 Iustin Pop
strategies, etc. In order to accomplish this, mark these nodes as
1787 bde65914 Iustin Pop
non-``vm_capable``::
1788 bde65914 Iustin Pop
1789 73225861 Iustin Pop
  $ gnt-node modify --vm-capable=no %node3%
1790 bde65914 Iustin Pop
1791 bde65914 Iustin Pop
The vm_capable status can be listed as usual via ``gnt-node list``::
1792 bde65914 Iustin Pop
1793 73225861 Iustin Pop
  $ gnt-node list -oname,vm_capable
1794 bde65914 Iustin Pop
  Node  VMCapable
1795 bde65914 Iustin Pop
  node1 Y
1796 bde65914 Iustin Pop
  node2 Y
1797 bde65914 Iustin Pop
  node3 N
1798 bde65914 Iustin Pop
1799 bde65914 Iustin Pop
When this flag is set, the cluster will not do any operations that
1800 bde65914 Iustin Pop
relate to instances on such nodes, e.g. hypervisor operations,
1801 bde65914 Iustin Pop
disk-related operations, etc. Basically they will just keep the ssconf
1802 bde65914 Iustin Pop
files, and if master candidates the full configuration.
1803 bde65914 Iustin Pop
1804 bde65914 Iustin Pop
Multi-site model
1805 bde65914 Iustin Pop
++++++++++++++++
1806 bde65914 Iustin Pop
1807 bde65914 Iustin Pop
If Ganeti is deployed in multi-site model, with each site being a node
1808 bde65914 Iustin Pop
group (so that instances are not relocated across the WAN by mistake),
1809 bde65914 Iustin Pop
it is conceivable that either the WAN latency is high or that some sites
1810 bde65914 Iustin Pop
have a lower reliability than others. In this case, it doesn't make
1811 bde65914 Iustin Pop
sense to replicate the job information across all sites (or even outside
1812 bde65914 Iustin Pop
of a “central” node group), so it should be possible to restrict which
1813 bde65914 Iustin Pop
nodes can become master candidates via the auto-promotion algorithm.
1814 bde65914 Iustin Pop
1815 bde65914 Iustin Pop
Ganeti 2.4 introduces for this purpose a new ``master_capable`` flag,
1816 bde65914 Iustin Pop
which (when unset) prevents nodes from being marked as master
1817 bde65914 Iustin Pop
candidates, either manually or automatically.
1818 bde65914 Iustin Pop
1819 bde65914 Iustin Pop
As usual, the node modify operation can change this flag::
1820 bde65914 Iustin Pop
1821 73225861 Iustin Pop
  $ gnt-node modify --auto-promote --master-capable=no %node3%
1822 bde65914 Iustin Pop
  Fri Jan  7 06:23:07 2011  - INFO: Demoting from master candidate
1823 bde65914 Iustin Pop
  Fri Jan  7 06:23:08 2011  - INFO: Promoted nodes to master candidate role: node4
1824 bde65914 Iustin Pop
  Modified node node3
1825 bde65914 Iustin Pop
   - master_capable -> False
1826 bde65914 Iustin Pop
   - master_candidate -> False
1827 bde65914 Iustin Pop
1828 bde65914 Iustin Pop
And the node list operation will list this flag::
1829 bde65914 Iustin Pop
1830 73225861 Iustin Pop
  $ gnt-node list -oname,master_capable %node1% %node2% %node3%
1831 bde65914 Iustin Pop
  Node  MasterCapable
1832 bde65914 Iustin Pop
  node1 Y
1833 bde65914 Iustin Pop
  node2 Y
1834 bde65914 Iustin Pop
  node3 N
1835 bde65914 Iustin Pop
1836 bde65914 Iustin Pop
Note that marking a node both not ``vm_capable`` and not
1837 bde65914 Iustin Pop
``master_capable`` makes the node practically unusable from Ganeti's
1838 bde65914 Iustin Pop
point of view. Hence these two flags should be used probably in
1839 bde65914 Iustin Pop
contrast: some nodes will be only master candidates (master_capable but
1840 bde65914 Iustin Pop
not vm_capable), and other nodes will only hold instances (vm_capable
1841 bde65914 Iustin Pop
but not master_capable).
1842 bde65914 Iustin Pop
1843 bde65914 Iustin Pop
1844 c71a1a3d Iustin Pop
Ganeti tools
1845 c71a1a3d Iustin Pop
------------
1846 c71a1a3d Iustin Pop
1847 c71a1a3d Iustin Pop
Beside the usual ``gnt-`` and ``ganeti-`` commands which are provided
1848 c71a1a3d Iustin Pop
and installed in ``$prefix/sbin`` at install time, there are a couple of
1849 c71a1a3d Iustin Pop
other tools installed which are used seldom but can be helpful in some
1850 c71a1a3d Iustin Pop
cases.
1851 c71a1a3d Iustin Pop
1852 c71a1a3d Iustin Pop
lvmstrap
1853 c71a1a3d Iustin Pop
++++++++
1854 c71a1a3d Iustin Pop
1855 c71a1a3d Iustin Pop
The ``lvmstrap`` tool, introduced in :ref:`configure-lvm-label` section,
1856 c71a1a3d Iustin Pop
has two modes of operation:
1857 c71a1a3d Iustin Pop
1858 c71a1a3d Iustin Pop
- ``diskinfo`` shows the discovered disks on the system and their status
1859 c71a1a3d Iustin Pop
- ``create`` takes all not-in-use disks and creates a volume group out
1860 c71a1a3d Iustin Pop
  of them
1861 c71a1a3d Iustin Pop
1862 c71a1a3d Iustin Pop
.. warning:: The ``create`` argument to this command causes data-loss!
1863 c71a1a3d Iustin Pop
1864 c71a1a3d Iustin Pop
cfgupgrade
1865 c71a1a3d Iustin Pop
++++++++++
1866 c71a1a3d Iustin Pop
1867 c71a1a3d Iustin Pop
The ``cfgupgrade`` tools is used to upgrade between major (and minor)
1868 91fb0d18 Bernardo Dal Seno
Ganeti versions, and to roll back. Point-releases are usually
1869 91fb0d18 Bernardo Dal Seno
transparent for the admin.
1870 c71a1a3d Iustin Pop
1871 c71a1a3d Iustin Pop
More information about the upgrade procedure is listed on the wiki at
1872 c71a1a3d Iustin Pop
http://code.google.com/p/ganeti/wiki/UpgradeNotes.
1873 c71a1a3d Iustin Pop
1874 b5672ea0 Iustin Pop
There is also a script designed to upgrade from Ganeti 1.2 to 2.0,
1875 b5672ea0 Iustin Pop
called ``cfgupgrade12``.
1876 b5672ea0 Iustin Pop
1877 c71a1a3d Iustin Pop
cfgshell
1878 c71a1a3d Iustin Pop
++++++++
1879 c71a1a3d Iustin Pop
1880 c71a1a3d Iustin Pop
.. note:: This command is not actively maintained; make sure you backup
1881 c71a1a3d Iustin Pop
   your configuration before using it
1882 c71a1a3d Iustin Pop
1883 c71a1a3d Iustin Pop
This can be used as an alternative to direct editing of the
1884 c71a1a3d Iustin Pop
main configuration file if Ganeti has a bug and prevents you, for
1885 c71a1a3d Iustin Pop
example, from removing an instance or a node from the configuration
1886 c71a1a3d Iustin Pop
file.
1887 c71a1a3d Iustin Pop
1888 c71a1a3d Iustin Pop
.. _burnin-label:
1889 c71a1a3d Iustin Pop
1890 c71a1a3d Iustin Pop
burnin
1891 c71a1a3d Iustin Pop
++++++
1892 c71a1a3d Iustin Pop
1893 c71a1a3d Iustin Pop
.. warning:: This command will erase existing instances if given as
1894 c71a1a3d Iustin Pop
   arguments!
1895 c71a1a3d Iustin Pop
1896 c71a1a3d Iustin Pop
This tool is used to exercise either the hardware of machines or
1897 c71a1a3d Iustin Pop
alternatively the Ganeti software. It is safe to run on an existing
1898 c71a1a3d Iustin Pop
cluster **as long as you don't pass it existing instance names**.
1899 c71a1a3d Iustin Pop
1900 c71a1a3d Iustin Pop
The command will, by default, execute a comprehensive set of operations
1901 c71a1a3d Iustin Pop
against a list of instances, these being:
1902 c71a1a3d Iustin Pop
1903 c71a1a3d Iustin Pop
- creation
1904 c71a1a3d Iustin Pop
- disk replacement (for redundant instances)
1905 c71a1a3d Iustin Pop
- failover and migration (for redundant instances)
1906 c71a1a3d Iustin Pop
- move (for non-redundant instances)
1907 c71a1a3d Iustin Pop
- disk growth
1908 c71a1a3d Iustin Pop
- add disks, remove disk
1909 c71a1a3d Iustin Pop
- add NICs, remove NICs
1910 c71a1a3d Iustin Pop
- export and then import
1911 c71a1a3d Iustin Pop
- rename
1912 c71a1a3d Iustin Pop
- reboot
1913 c71a1a3d Iustin Pop
- shutdown/startup
1914 c71a1a3d Iustin Pop
- and finally removal of the test instances
1915 c71a1a3d Iustin Pop
1916 c71a1a3d Iustin Pop
Executing all these operations will test that the hardware performs
1917 c71a1a3d Iustin Pop
well: the creation, disk replace, disk add and disk growth will exercise
1918 c71a1a3d Iustin Pop
the storage and network; the migrate command will test the memory of the
1919 c71a1a3d Iustin Pop
systems. Depending on the passed options, it can also test that the
1920 c71a1a3d Iustin Pop
instance OS definitions are executing properly the rename, import and
1921 c71a1a3d Iustin Pop
export operations.
1922 c71a1a3d Iustin Pop
1923 ea5fd476 Iustin Pop
sanitize-config
1924 ea5fd476 Iustin Pop
+++++++++++++++
1925 ea5fd476 Iustin Pop
1926 ea5fd476 Iustin Pop
This tool takes the Ganeti configuration and outputs a "sanitized"
1927 ea5fd476 Iustin Pop
version, by randomizing or clearing:
1928 ea5fd476 Iustin Pop
1929 ea5fd476 Iustin Pop
- DRBD secrets and cluster public key (always)
1930 ea5fd476 Iustin Pop
- host names (optional)
1931 ea5fd476 Iustin Pop
- IPs (optional)
1932 ea5fd476 Iustin Pop
- OS names (optional)
1933 ea5fd476 Iustin Pop
- LV names (optional, only useful for very old clusters which still have
1934 ea5fd476 Iustin Pop
  instances whose LVs are based on the instance name)
1935 ea5fd476 Iustin Pop
1936 ea5fd476 Iustin Pop
By default, all optional items are activated except the LV name
1937 ea5fd476 Iustin Pop
randomization. When passing ``--no-randomization``, which disables the
1938 ea5fd476 Iustin Pop
optional items (i.e. just the DRBD secrets and cluster public keys are
1939 ea5fd476 Iustin Pop
randomized), the resulting file can be used as a safety copy of the
1940 ea5fd476 Iustin Pop
cluster config - while not trivial, the layout of the cluster can be
1941 ea5fd476 Iustin Pop
recreated from it and if the instance disks have not been lost it
1942 ea5fd476 Iustin Pop
permits recovery from the loss of all master candidates.
1943 ea5fd476 Iustin Pop
1944 e0897adf Michael Hanselmann
move-instance
1945 e0897adf Michael Hanselmann
+++++++++++++
1946 e0897adf Michael Hanselmann
1947 e0897adf Michael Hanselmann
See :doc:`separate documentation for move-instance <move-instance>`.
1948 e0897adf Michael Hanselmann
1949 60af7882 Michele Tartara
users-setup
1950 60af7882 Michele Tartara
+++++++++++
1951 60af7882 Michele Tartara
1952 60af7882 Michele Tartara
Ganeti can either be run entirely as root, or with every daemon running as
1953 60af7882 Michele Tartara
its own specific user (if the parameters ``--with-user-prefix`` and/or
1954 60af7882 Michele Tartara
``--with-group-prefix`` have been specified at ``./configure``-time).
1955 60af7882 Michele Tartara
1956 60af7882 Michele Tartara
In case split users are activated, they are required to exist on the system,
1957 60af7882 Michele Tartara
and they need to belong to the proper groups in order for the access
1958 60af7882 Michele Tartara
permissions to files and programs to be correct.
1959 60af7882 Michele Tartara
1960 60af7882 Michele Tartara
The ``users-setup`` tool, when run, takes care of setting up the proper
1961 60af7882 Michele Tartara
users and groups.
1962 60af7882 Michele Tartara
1963 4a68b28b Michele Tartara
When invoked without parameters, the tool runs in interactive mode, showing the
1964 4a68b28b Michele Tartara
list of actions it will perform and asking for confirmation before proceeding.
1965 4a68b28b Michele Tartara
1966 4a68b28b Michele Tartara
Providing the ``--yes-do-it`` parameter to the tool prevents the confirmation
1967 4a68b28b Michele Tartara
from being asked, and the users and groups will be created immediately.
1968 60af7882 Michele Tartara
1969 e0897adf Michael Hanselmann
.. TODO: document cluster-merge tool
1970 e0897adf Michael Hanselmann
1971 ea5fd476 Iustin Pop
1972 c71a1a3d Iustin Pop
Other Ganeti projects
1973 c71a1a3d Iustin Pop
---------------------
1974 c71a1a3d Iustin Pop
1975 1ebe6dbd Iustin Pop
Below is a list (which might not be up-to-date) of additional projects
1976 1ebe6dbd Iustin Pop
that can be useful in a Ganeti deployment. They can be downloaded from
1977 1ebe6dbd Iustin Pop
the project site (http://code.google.com/p/ganeti/) and the repositories
1978 1ebe6dbd Iustin Pop
are also on the project git site (http://git.ganeti.org).
1979 c71a1a3d Iustin Pop
1980 c71a1a3d Iustin Pop
NBMA tools
1981 c71a1a3d Iustin Pop
++++++++++
1982 c71a1a3d Iustin Pop
1983 c71a1a3d Iustin Pop
The ``ganeti-nbma`` software is designed to allow instances to live on a
1984 c71a1a3d Iustin Pop
separate, virtual network from the nodes, and in an environment where
1985 c71a1a3d Iustin Pop
nodes are not guaranteed to be able to reach each other via multicasting
1986 c71a1a3d Iustin Pop
or broadcasting. For more information see the README in the source
1987 c71a1a3d Iustin Pop
archive.
1988 c71a1a3d Iustin Pop
1989 c71a1a3d Iustin Pop
ganeti-htools
1990 c71a1a3d Iustin Pop
+++++++++++++
1991 c71a1a3d Iustin Pop
1992 1ebe6dbd Iustin Pop
Before Ganeti version 2.5, this was a standalone project; since that
1993 1ebe6dbd Iustin Pop
version it is integrated into the Ganeti codebase (see
1994 1ebe6dbd Iustin Pop
:doc:`install-quick` for instructions on how to enable it). If you run
1995 1ebe6dbd Iustin Pop
an older Ganeti version, you will have to download and build it
1996 1ebe6dbd Iustin Pop
separately.
1997 c71a1a3d Iustin Pop
1998 c71a1a3d Iustin Pop
For more information and installation instructions, see the README file
1999 c71a1a3d Iustin Pop
in the source archive.
2000 c71a1a3d Iustin Pop
2001 558fd122 Michael Hanselmann
.. vim: set textwidth=72 :
2002 c71a1a3d Iustin Pop
.. Local Variables:
2003 c71a1a3d Iustin Pop
.. mode: rst
2004 c71a1a3d Iustin Pop
.. fill-column: 72
2005 c71a1a3d Iustin Pop
.. End: