Statistics
| Branch: | Tag: | Revision:

root / doc / hooks.rst @ 1bf1ce3f

History | View | Annotate | Download (19.4 kB)

1 4d6443f4 Iustin Pop
Ganeti customisation using hooks
2 4d6443f4 Iustin Pop
================================
3 4d6443f4 Iustin Pop
4 aff49a15 Iustin Pop
Documents Ganeti version 2.6
5 4d6443f4 Iustin Pop
6 4d6443f4 Iustin Pop
.. contents::
7 4d6443f4 Iustin Pop
8 4d6443f4 Iustin Pop
Introduction
9 4d6443f4 Iustin Pop
------------
10 4d6443f4 Iustin Pop
11 db620e95 Michael Hanselmann
In order to allow customisation of operations, Ganeti runs scripts in
12 db620e95 Michael Hanselmann
sub-directories of ``@SYSCONFDIR@/ganeti/hooks``. These sub-directories
13 db620e95 Michael Hanselmann
are named ``$hook-$phase.d``, where ``$phase`` is either ``pre`` or
14 db620e95 Michael Hanselmann
``post`` and ``$hook`` matches the directory name given for a hook (e.g.
15 db620e95 Michael Hanselmann
``cluster-verify-post.d`` or ``node-add-pre.d``).
16 4d6443f4 Iustin Pop
17 4d6443f4 Iustin Pop
This is similar to the ``/etc/network/`` structure present in Debian
18 4d6443f4 Iustin Pop
for network interface handling.
19 4d6443f4 Iustin Pop
20 4d6443f4 Iustin Pop
Organisation
21 4d6443f4 Iustin Pop
------------
22 4d6443f4 Iustin Pop
23 4d6443f4 Iustin Pop
For every operation, two sets of scripts are run:
24 4d6443f4 Iustin Pop
25 4d6443f4 Iustin Pop
- pre phase (for authorization/checking)
26 4d6443f4 Iustin Pop
- post phase (for logging)
27 4d6443f4 Iustin Pop
28 4d6443f4 Iustin Pop
Also, for each operation, the scripts are run on one or more nodes,
29 4d6443f4 Iustin Pop
depending on the operation type.
30 4d6443f4 Iustin Pop
31 4d6443f4 Iustin Pop
Note that, even though we call them scripts, we are actually talking
32 4d6443f4 Iustin Pop
about any executable.
33 4d6443f4 Iustin Pop
34 4d6443f4 Iustin Pop
*pre* scripts
35 4d6443f4 Iustin Pop
~~~~~~~~~~~~~
36 4d6443f4 Iustin Pop
37 4d6443f4 Iustin Pop
The *pre* scripts have a definite target: to check that the operation
38 4d6443f4 Iustin Pop
is allowed given the site-specific constraints. You could have, for
39 4d6443f4 Iustin Pop
example, a rule that says every new instance is required to exists in
40 4d6443f4 Iustin Pop
a database; to implement this, you could write a script that checks
41 4d6443f4 Iustin Pop
the new instance parameters against your database.
42 4d6443f4 Iustin Pop
43 4d6443f4 Iustin Pop
The objective of these scripts should be their return code (zero or
44 4d6443f4 Iustin Pop
non-zero for success and failure). However, if they modify the
45 4d6443f4 Iustin Pop
environment in any way, they should be idempotent, as failed
46 4d6443f4 Iustin Pop
executions could be restarted and thus the script(s) run again with
47 4d6443f4 Iustin Pop
exactly the same parameters.
48 4d6443f4 Iustin Pop
49 4d6443f4 Iustin Pop
Note that if a node is unreachable at the time a hooks is run, this
50 4d6443f4 Iustin Pop
will not be interpreted as a deny for the execution. In other words,
51 4d6443f4 Iustin Pop
only an actual error returned from a script will cause abort, and not
52 4d6443f4 Iustin Pop
an unreachable node.
53 4d6443f4 Iustin Pop
54 4d6443f4 Iustin Pop
Therefore, if you want to guarantee that a hook script is run and
55 4d6443f4 Iustin Pop
denies an action, it's best to put it on the master node.
56 4d6443f4 Iustin Pop
57 4d6443f4 Iustin Pop
*post* scripts
58 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~
59 4d6443f4 Iustin Pop
60 4d6443f4 Iustin Pop
These scripts should do whatever you need as a reaction to the
61 4d6443f4 Iustin Pop
completion of an operation. Their return code is not checked (but
62 4d6443f4 Iustin Pop
logged), and they should not depend on the fact that the *pre* scripts
63 4d6443f4 Iustin Pop
have been run.
64 4d6443f4 Iustin Pop
65 4d6443f4 Iustin Pop
Naming
66 4d6443f4 Iustin Pop
~~~~~~
67 4d6443f4 Iustin Pop
68 dd7f6776 Michael Hanselmann
The allowed names for the scripts consist of (similar to *run-parts*)
69 4d6443f4 Iustin Pop
upper and lower case, digits, underscores and hyphens. In other words,
70 4d6443f4 Iustin Pop
the regexp ``^[a-zA-Z0-9_-]+$``. Also, non-executable scripts will be
71 4d6443f4 Iustin Pop
ignored.
72 4d6443f4 Iustin Pop
73 4d6443f4 Iustin Pop
74 4d6443f4 Iustin Pop
Order of execution
75 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~~~~~
76 4d6443f4 Iustin Pop
77 4d6443f4 Iustin Pop
On a single node, the scripts in a directory are run in lexicographic
78 4d6443f4 Iustin Pop
order (more exactly, the python string comparison order). It is
79 4d6443f4 Iustin Pop
advisable to implement the usual *NN-name* convention where *NN* is a
80 4d6443f4 Iustin Pop
two digit number.
81 4d6443f4 Iustin Pop
82 4d6443f4 Iustin Pop
For an operation whose hooks are run on multiple nodes, there is no
83 4d6443f4 Iustin Pop
specific ordering of nodes with regard to hooks execution; you should
84 4d6443f4 Iustin Pop
assume that the scripts are run in parallel on the target nodes
85 4d6443f4 Iustin Pop
(keeping on each node the above specified ordering).  If you need any
86 4d6443f4 Iustin Pop
kind of inter-node synchronisation, you have to implement it yourself
87 4d6443f4 Iustin Pop
in the scripts.
88 4d6443f4 Iustin Pop
89 4d6443f4 Iustin Pop
Execution environment
90 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~
91 4d6443f4 Iustin Pop
92 4d6443f4 Iustin Pop
The scripts will be run as follows:
93 4d6443f4 Iustin Pop
94 4d6443f4 Iustin Pop
- no command line arguments
95 4d6443f4 Iustin Pop
96 4d6443f4 Iustin Pop
- no controlling *tty*
97 4d6443f4 Iustin Pop
98 4d6443f4 Iustin Pop
- stdin is actually */dev/null*
99 4d6443f4 Iustin Pop
100 4d6443f4 Iustin Pop
- stdout and stderr are directed to files
101 4d6443f4 Iustin Pop
102 fe5ca2bb Andrea Spadaccini
- PATH is reset to :pyeval:`constants.HOOKS_PATH`
103 4d6443f4 Iustin Pop
104 4d6443f4 Iustin Pop
- the environment is cleared, and only ganeti-specific variables will
105 4d6443f4 Iustin Pop
  be left
106 4d6443f4 Iustin Pop
107 4d6443f4 Iustin Pop
108 5bbd3f7f Michael Hanselmann
All information about the cluster is passed using environment
109 4d6443f4 Iustin Pop
variables. Different operations will have sligthly different
110 4d6443f4 Iustin Pop
environments, but most of the variables are common.
111 4d6443f4 Iustin Pop
112 4d6443f4 Iustin Pop
Operation list
113 4d6443f4 Iustin Pop
--------------
114 4d6443f4 Iustin Pop
115 4d6443f4 Iustin Pop
Node operations
116 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~~
117 4d6443f4 Iustin Pop
118 8ac5c5d7 Michael Hanselmann
OP_NODE_ADD
119 4d6443f4 Iustin Pop
+++++++++++
120 4d6443f4 Iustin Pop
121 4d6443f4 Iustin Pop
Adds a node to the cluster.
122 4d6443f4 Iustin Pop
123 4d6443f4 Iustin Pop
:directory: node-add
124 49e4c837 David Knowles
:env. vars: NODE_NAME, NODE_PIP, NODE_SIP, MASTER_CAPABLE, VM_CAPABLE
125 4d6443f4 Iustin Pop
:pre-execution: all existing nodes
126 4d6443f4 Iustin Pop
:post-execution: all nodes plus the new node
127 4d6443f4 Iustin Pop
128 4d6443f4 Iustin Pop
129 8ac5c5d7 Michael Hanselmann
OP_NODE_REMOVE
130 4d6443f4 Iustin Pop
++++++++++++++
131 4d6443f4 Iustin Pop
132 7faf5110 Michael Hanselmann
Removes a node from the cluster. On the removed node the hooks are
133 7faf5110 Michael Hanselmann
called during the execution of the operation and not after its
134 7faf5110 Michael Hanselmann
completion.
135 4d6443f4 Iustin Pop
136 4d6443f4 Iustin Pop
:directory: node-remove
137 4d6443f4 Iustin Pop
:env. vars: NODE_NAME
138 4d6443f4 Iustin Pop
:pre-execution: all existing nodes except the removed node
139 cd46f3b4 Luca Bigliardi
:post-execution: all existing nodes
140 4d6443f4 Iustin Pop
141 4d6443f4 Iustin Pop
OP_NODE_SET_PARAMS
142 4d6443f4 Iustin Pop
++++++++++++++++++
143 4d6443f4 Iustin Pop
144 4d6443f4 Iustin Pop
Changes a node's parameters.
145 4d6443f4 Iustin Pop
146 4d6443f4 Iustin Pop
:directory: node-modify
147 49e4c837 David Knowles
:env. vars: MASTER_CANDIDATE, OFFLINE, DRAINED, MASTER_CAPABLE, VM_CAPABLE
148 4d6443f4 Iustin Pop
:pre-execution: master node, the target node
149 4d6443f4 Iustin Pop
:post-execution: master node, the target node
150 4d6443f4 Iustin Pop
151 6c6b7f8a Michael Hanselmann
OP_NODE_MIGRATE
152 6c6b7f8a Michael Hanselmann
++++++++++++++++
153 6c6b7f8a Michael Hanselmann
154 6c6b7f8a Michael Hanselmann
Relocate secondary instances from a node.
155 6c6b7f8a Michael Hanselmann
156 6c6b7f8a Michael Hanselmann
:directory: node-migrate
157 6c6b7f8a Michael Hanselmann
:env. vars: NODE_NAME
158 6c6b7f8a Michael Hanselmann
:pre-execution: master node
159 6c6b7f8a Michael Hanselmann
:post-execution: master node
160 6c6b7f8a Michael Hanselmann
161 4d6443f4 Iustin Pop
162 b1ee5610 Adeodato Simo
Node group operations
163 b1ee5610 Adeodato Simo
~~~~~~~~~~~~~~~~~~~~~
164 b1ee5610 Adeodato Simo
165 8ac5c5d7 Michael Hanselmann
OP_GROUP_ADD
166 b1ee5610 Adeodato Simo
++++++++++++
167 b1ee5610 Adeodato Simo
168 b1ee5610 Adeodato Simo
Adds a node group to the cluster.
169 b1ee5610 Adeodato Simo
170 b1ee5610 Adeodato Simo
:directory: group-add
171 b1ee5610 Adeodato Simo
:env. vars: GROUP_NAME
172 b1ee5610 Adeodato Simo
:pre-execution: master node
173 b1ee5610 Adeodato Simo
:post-execution: master node
174 b1ee5610 Adeodato Simo
175 90e99856 Adeodato Simo
OP_GROUP_SET_PARAMS
176 90e99856 Adeodato Simo
+++++++++++++++++++
177 90e99856 Adeodato Simo
178 90e99856 Adeodato Simo
Changes a node group's parameters.
179 90e99856 Adeodato Simo
180 90e99856 Adeodato Simo
:directory: group-modify
181 90e99856 Adeodato Simo
:env. vars: GROUP_NAME, NEW_ALLOC_POLICY
182 90e99856 Adeodato Simo
:pre-execution: master node
183 90e99856 Adeodato Simo
:post-execution: master node
184 90e99856 Adeodato Simo
185 8ac5c5d7 Michael Hanselmann
OP_GROUP_REMOVE
186 94bd652a Adeodato Simo
+++++++++++++++
187 94bd652a Adeodato Simo
188 94bd652a Adeodato Simo
Removes a node group from the cluster. Since the node group must be
189 94bd652a Adeodato Simo
empty for removal to succeed, the concept of "nodes in the group" does
190 94bd652a Adeodato Simo
not exist, and the hook is only executed in the master node.
191 94bd652a Adeodato Simo
192 94bd652a Adeodato Simo
:directory: group-remove
193 94bd652a Adeodato Simo
:env. vars: GROUP_NAME
194 94bd652a Adeodato Simo
:pre-execution: master node
195 94bd652a Adeodato Simo
:post-execution: master node
196 94bd652a Adeodato Simo
197 8ac5c5d7 Michael Hanselmann
OP_GROUP_RENAME
198 4fe5cf90 Adeodato Simo
+++++++++++++++
199 4fe5cf90 Adeodato Simo
200 4fe5cf90 Adeodato Simo
Renames a node group.
201 4fe5cf90 Adeodato Simo
202 4fe5cf90 Adeodato Simo
:directory: group-rename
203 4fe5cf90 Adeodato Simo
:env. vars: OLD_NAME, NEW_NAME
204 4fe5cf90 Adeodato Simo
:pre-execution: master node and all nodes in the group
205 4fe5cf90 Adeodato Simo
:post-execution: master node and all nodes in the group
206 4fe5cf90 Adeodato Simo
207 08f8c82c Michael Hanselmann
OP_GROUP_EVACUATE
208 08f8c82c Michael Hanselmann
+++++++++++++++++
209 08f8c82c Michael Hanselmann
210 08f8c82c Michael Hanselmann
Evacuates a node group.
211 08f8c82c Michael Hanselmann
212 08f8c82c Michael Hanselmann
:directory: group-evacuate
213 08f8c82c Michael Hanselmann
:env. vars: GROUP_NAME, TARGET_GROUPS
214 08f8c82c Michael Hanselmann
:pre-execution: master node and all nodes in the group
215 08f8c82c Michael Hanselmann
:post-execution: master node and all nodes in the group
216 08f8c82c Michael Hanselmann
217 b1ee5610 Adeodato Simo
218 4d6443f4 Iustin Pop
Instance operations
219 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~~~~~~
220 4d6443f4 Iustin Pop
221 4d6443f4 Iustin Pop
All instance operations take at least the following variables:
222 dd5e7794 David Knowles
INSTANCE_NAME, INSTANCE_PRIMARY, INSTANCE_SECONDARY,
223 4d6443f4 Iustin Pop
INSTANCE_OS_TYPE, INSTANCE_DISK_TEMPLATE, INSTANCE_MEMORY,
224 4d6443f4 Iustin Pop
INSTANCE_DISK_SIZES, INSTANCE_VCPUS, INSTANCE_NIC_COUNT,
225 4d6443f4 Iustin Pop
INSTANCE_NICn_IP, INSTANCE_NICn_BRIDGE, INSTANCE_NICn_MAC,
226 4d6443f4 Iustin Pop
INSTANCE_DISK_COUNT, INSTANCE_DISKn_SIZE, INSTANCE_DISKn_MODE.
227 4d6443f4 Iustin Pop
228 4d6443f4 Iustin Pop
The INSTANCE_NICn_* and INSTANCE_DISKn_* variables represent the
229 4d6443f4 Iustin Pop
properties of the *n* -th NIC and disk, and are zero-indexed.
230 4d6443f4 Iustin Pop
231 4d6443f4 Iustin Pop
232 8ac5c5d7 Michael Hanselmann
OP_INSTANCE_CREATE
233 8ac5c5d7 Michael Hanselmann
++++++++++++++++++
234 4d6443f4 Iustin Pop
235 4d6443f4 Iustin Pop
Creates a new instance.
236 4d6443f4 Iustin Pop
237 4d6443f4 Iustin Pop
:directory: instance-add
238 4d6443f4 Iustin Pop
:env. vars: ADD_MODE, SRC_NODE, SRC_PATH, SRC_IMAGES
239 4d6443f4 Iustin Pop
:pre-execution: master node, primary and secondary nodes
240 4d6443f4 Iustin Pop
:post-execution: master node, primary and secondary nodes
241 4d6443f4 Iustin Pop
242 4d6443f4 Iustin Pop
OP_INSTANCE_REINSTALL
243 4d6443f4 Iustin Pop
+++++++++++++++++++++
244 4d6443f4 Iustin Pop
245 4d6443f4 Iustin Pop
Reinstalls an instance.
246 4d6443f4 Iustin Pop
247 4d6443f4 Iustin Pop
:directory: instance-reinstall
248 4d6443f4 Iustin Pop
:env. vars: only the standard instance vars
249 4d6443f4 Iustin Pop
:pre-execution: master node, primary and secondary nodes
250 4d6443f4 Iustin Pop
:post-execution: master node, primary and secondary nodes
251 4d6443f4 Iustin Pop
252 4d6443f4 Iustin Pop
OP_BACKUP_EXPORT
253 4d6443f4 Iustin Pop
++++++++++++++++
254 4d6443f4 Iustin Pop
255 4d6443f4 Iustin Pop
Exports the instance.
256 4d6443f4 Iustin Pop
257 4d6443f4 Iustin Pop
:directory: instance-export
258 49e4c837 David Knowles
:env. vars: EXPORT_MODE, EXPORT_NODE, EXPORT_DO_SHUTDOWN, REMOVE_INSTANCE
259 4d6443f4 Iustin Pop
:pre-execution: master node, primary and secondary nodes
260 4d6443f4 Iustin Pop
:post-execution: master node, primary and secondary nodes
261 4d6443f4 Iustin Pop
262 dd5e7794 David Knowles
OP_INSTANCE_STARTUP
263 18009c1e Iustin Pop
+++++++++++++++++++
264 4d6443f4 Iustin Pop
265 4d6443f4 Iustin Pop
Starts an instance.
266 4d6443f4 Iustin Pop
267 4d6443f4 Iustin Pop
:directory: instance-start
268 454fe3cd Luca Bigliardi
:env. vars: FORCE
269 4d6443f4 Iustin Pop
:pre-execution: master node, primary and secondary nodes
270 4d6443f4 Iustin Pop
:post-execution: master node, primary and secondary nodes
271 4d6443f4 Iustin Pop
272 4d6443f4 Iustin Pop
OP_INSTANCE_SHUTDOWN
273 4d6443f4 Iustin Pop
++++++++++++++++++++
274 4d6443f4 Iustin Pop
275 4d6443f4 Iustin Pop
Stops an instance.
276 4d6443f4 Iustin Pop
277 6c6b7f8a Michael Hanselmann
:directory: instance-stop
278 49e4c837 David Knowles
:env. vars: TIMEOUT
279 4d6443f4 Iustin Pop
:pre-execution: master node, primary and secondary nodes
280 4d6443f4 Iustin Pop
:post-execution: master node, primary and secondary nodes
281 4d6443f4 Iustin Pop
282 4d6443f4 Iustin Pop
OP_INSTANCE_REBOOT
283 4d6443f4 Iustin Pop
++++++++++++++++++
284 4d6443f4 Iustin Pop
285 4d6443f4 Iustin Pop
Reboots an instance.
286 4d6443f4 Iustin Pop
287 4d6443f4 Iustin Pop
:directory: instance-reboot
288 49e4c837 David Knowles
:env. vars: IGNORE_SECONDARIES, REBOOT_TYPE, SHUTDOWN_TIMEOUT
289 4d6443f4 Iustin Pop
:pre-execution: master node, primary and secondary nodes
290 4d6443f4 Iustin Pop
:post-execution: master node, primary and secondary nodes
291 4d6443f4 Iustin Pop
292 dd5e7794 David Knowles
OP_INSTANCE_SET_PARAMS
293 18009c1e Iustin Pop
++++++++++++++++++++++
294 4d6443f4 Iustin Pop
295 4d6443f4 Iustin Pop
Modifies the instance parameters.
296 4d6443f4 Iustin Pop
297 4d6443f4 Iustin Pop
:directory: instance-modify
298 2c0af7da Guido Trotter
:env. vars: NEW_DISK_TEMPLATE, RUNTIME_MEMORY
299 4d6443f4 Iustin Pop
:pre-execution: master node, primary and secondary nodes
300 4d6443f4 Iustin Pop
:post-execution: master node, primary and secondary nodes
301 4d6443f4 Iustin Pop
302 4d6443f4 Iustin Pop
OP_INSTANCE_FAILOVER
303 4d6443f4 Iustin Pop
++++++++++++++++++++
304 4d6443f4 Iustin Pop
305 e73a5804 Luca Bigliardi
Failovers an instance. In the post phase INSTANCE_PRIMARY and
306 dd5e7794 David Knowles
INSTANCE_SECONDARY refer to the nodes that were repectively primary
307 e73a5804 Luca Bigliardi
and secondary before failover.
308 4d6443f4 Iustin Pop
309 4d6443f4 Iustin Pop
:directory: instance-failover
310 49e4c837 David Knowles
:env. vars: IGNORE_CONSISTENCY, SHUTDOWN_TIMEOUT, OLD_PRIMARY, OLD_SECONDARY, NEW_PRIMARY, NEW_SECONDARY
311 4d6443f4 Iustin Pop
:pre-execution: master node, secondary node
312 abd8e836 Iustin Pop
:post-execution: master node, primary and secondary nodes
313 4d6443f4 Iustin Pop
314 4d6443f4 Iustin Pop
OP_INSTANCE_MIGRATE
315 4d6443f4 Iustin Pop
++++++++++++++++++++
316 4d6443f4 Iustin Pop
317 e73a5804 Luca Bigliardi
Migrates an instance. In the post phase INSTANCE_PRIMARY and
318 dd5e7794 David Knowles
INSTANCE_SECONDARY refer to the nodes that were repectively primary
319 e73a5804 Luca Bigliardi
and secondary before migration.
320 4d6443f4 Iustin Pop
321 6c6b7f8a Michael Hanselmann
:directory: instance-migrate
322 49e4c837 David Knowles
:env. vars: MIGRATE_LIVE, MIGRATE_CLEANUP, OLD_PRIMARY, OLD_SECONDARY, NEW_PRIMARY, NEW_SECONDARY
323 4d6443f4 Iustin Pop
:pre-execution: master node, secondary node
324 abd8e836 Iustin Pop
:post-execution: master node, primary and secondary nodes
325 4d6443f4 Iustin Pop
326 4d6443f4 Iustin Pop
327 4d6443f4 Iustin Pop
OP_INSTANCE_REMOVE
328 4d6443f4 Iustin Pop
++++++++++++++++++
329 4d6443f4 Iustin Pop
330 4d6443f4 Iustin Pop
Remove an instance.
331 4d6443f4 Iustin Pop
332 4d6443f4 Iustin Pop
:directory: instance-remove
333 49e4c837 David Knowles
:env. vars: SHUTDOWN_TIMEOUT
334 4d6443f4 Iustin Pop
:pre-execution: master node
335 abd8e836 Iustin Pop
:post-execution: master node, primary and secondary nodes
336 4d6443f4 Iustin Pop
337 4d6443f4 Iustin Pop
OP_INSTANCE_GROW_DISK
338 4d6443f4 Iustin Pop
+++++++++++++++++++++
339 4d6443f4 Iustin Pop
340 4d6443f4 Iustin Pop
Grows the disk of an instance.
341 4d6443f4 Iustin Pop
342 4d6443f4 Iustin Pop
:directory: disk-grow
343 4d6443f4 Iustin Pop
:env. vars: DISK, AMOUNT
344 abd8e836 Iustin Pop
:pre-execution: master node, primary and secondary nodes
345 abd8e836 Iustin Pop
:post-execution: master node, primary and secondary nodes
346 4d6443f4 Iustin Pop
347 4d6443f4 Iustin Pop
OP_INSTANCE_RENAME
348 4d6443f4 Iustin Pop
++++++++++++++++++
349 4d6443f4 Iustin Pop
350 4d6443f4 Iustin Pop
Renames an instance.
351 4d6443f4 Iustin Pop
352 4d6443f4 Iustin Pop
:directory: instance-rename
353 4d6443f4 Iustin Pop
:env. vars: INSTANCE_NEW_NAME
354 4d6443f4 Iustin Pop
:pre-execution: master node, primary and secondary nodes
355 4d6443f4 Iustin Pop
:post-execution: master node, primary and secondary nodes
356 4d6443f4 Iustin Pop
357 6c6b7f8a Michael Hanselmann
OP_INSTANCE_MOVE
358 6c6b7f8a Michael Hanselmann
++++++++++++++++
359 6c6b7f8a Michael Hanselmann
360 6c6b7f8a Michael Hanselmann
Move an instance by data-copying.
361 6c6b7f8a Michael Hanselmann
362 6c6b7f8a Michael Hanselmann
:directory: instance-move
363 49e4c837 David Knowles
:env. vars: TARGET_NODE, SHUTDOWN_TIMEOUT
364 6c6b7f8a Michael Hanselmann
:pre-execution: master node, primary and target nodes
365 6c6b7f8a Michael Hanselmann
:post-execution: master node, primary and target nodes
366 6c6b7f8a Michael Hanselmann
367 6c6b7f8a Michael Hanselmann
OP_INSTANCE_RECREATE_DISKS
368 6c6b7f8a Michael Hanselmann
++++++++++++++++++++++++++
369 6c6b7f8a Michael Hanselmann
370 6c6b7f8a Michael Hanselmann
Recreate an instance's missing disks.
371 6c6b7f8a Michael Hanselmann
372 6c6b7f8a Michael Hanselmann
:directory: instance-recreate-disks
373 6c6b7f8a Michael Hanselmann
:env. vars: only the standard instance vars
374 6c6b7f8a Michael Hanselmann
:pre-execution: master node, primary and secondary nodes
375 6c6b7f8a Michael Hanselmann
:post-execution: master node, primary and secondary nodes
376 6c6b7f8a Michael Hanselmann
377 6c6b7f8a Michael Hanselmann
OP_INSTANCE_REPLACE_DISKS
378 6c6b7f8a Michael Hanselmann
+++++++++++++++++++++++++
379 6c6b7f8a Michael Hanselmann
380 6c6b7f8a Michael Hanselmann
Replace the disks of an instance.
381 6c6b7f8a Michael Hanselmann
382 6c6b7f8a Michael Hanselmann
:directory: mirrors-replace
383 6c6b7f8a Michael Hanselmann
:env. vars: MODE, NEW_SECONDARY, OLD_SECONDARY
384 6c6b7f8a Michael Hanselmann
:pre-execution: master node, primary and new secondary nodes
385 6c6b7f8a Michael Hanselmann
:post-execution: master node, primary and new secondary nodes
386 6c6b7f8a Michael Hanselmann
387 1aef3df8 Michael Hanselmann
OP_INSTANCE_CHANGE_GROUP
388 1aef3df8 Michael Hanselmann
++++++++++++++++++++++++
389 1aef3df8 Michael Hanselmann
390 1aef3df8 Michael Hanselmann
Moves an instance to another group.
391 1aef3df8 Michael Hanselmann
392 1aef3df8 Michael Hanselmann
:directory: instance-change-group
393 1aef3df8 Michael Hanselmann
:env. vars: TARGET_GROUPS
394 1aef3df8 Michael Hanselmann
:pre-execution: master node
395 1aef3df8 Michael Hanselmann
:post-execution: master node
396 1aef3df8 Michael Hanselmann
397 6c6b7f8a Michael Hanselmann
398 4d6443f4 Iustin Pop
Cluster operations
399 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~~~~~
400 4d6443f4 Iustin Pop
401 8ac5c5d7 Michael Hanselmann
OP_CLUSTER_POST_INIT
402 035a7783 Luca Bigliardi
++++++++++++++++++++
403 035a7783 Luca Bigliardi
404 7faf5110 Michael Hanselmann
This hook is called via a special "empty" LU right after cluster
405 7faf5110 Michael Hanselmann
initialization.
406 035a7783 Luca Bigliardi
407 035a7783 Luca Bigliardi
:directory: cluster-init
408 035a7783 Luca Bigliardi
:env. vars: none
409 035a7783 Luca Bigliardi
:pre-execution: none
410 035a7783 Luca Bigliardi
:post-execution: master node
411 035a7783 Luca Bigliardi
412 8ac5c5d7 Michael Hanselmann
OP_CLUSTER_DESTROY
413 d87e1814 Luca Bigliardi
++++++++++++++++++
414 d87e1814 Luca Bigliardi
415 7faf5110 Michael Hanselmann
The post phase of this hook is called during the execution of destroy
416 7faf5110 Michael Hanselmann
operation and not after its completion.
417 d87e1814 Luca Bigliardi
418 d87e1814 Luca Bigliardi
:directory: cluster-destroy
419 d87e1814 Luca Bigliardi
:env. vars: none
420 d87e1814 Luca Bigliardi
:pre-execution: none
421 d87e1814 Luca Bigliardi
:post-execution: master node
422 d87e1814 Luca Bigliardi
423 56372573 Guido Trotter
OP_CLUSTER_VERIFY_GROUP
424 56372573 Guido Trotter
+++++++++++++++++++++++
425 4d6443f4 Iustin Pop
426 56372573 Guido Trotter
Verifies all nodes in a group. This is a special LU with regard to
427 4d6443f4 Iustin Pop
hooks, as the result of the opcode will be combined with the result of
428 4d6443f4 Iustin Pop
post-execution hooks, in order to allow administrators to enhance the
429 4d6443f4 Iustin Pop
cluster verification procedure.
430 4d6443f4 Iustin Pop
431 4d6443f4 Iustin Pop
:directory: cluster-verify
432 35e994e9 Iustin Pop
:env. vars: CLUSTER, MASTER, CLUSTER_TAGS, NODE_TAGS_<name>
433 4d6443f4 Iustin Pop
:pre-execution: none
434 56372573 Guido Trotter
:post-execution: all nodes in a group
435 4d6443f4 Iustin Pop
436 4d6443f4 Iustin Pop
OP_CLUSTER_RENAME
437 4d6443f4 Iustin Pop
+++++++++++++++++
438 4d6443f4 Iustin Pop
439 4d6443f4 Iustin Pop
Renames the cluster.
440 4d6443f4 Iustin Pop
441 4d6443f4 Iustin Pop
:directory: cluster-rename
442 4d6443f4 Iustin Pop
:env. vars: NEW_NAME
443 4d6443f4 Iustin Pop
:pre-execution: master-node
444 4d6443f4 Iustin Pop
:post-execution: master-node
445 4d6443f4 Iustin Pop
446 4d6443f4 Iustin Pop
OP_CLUSTER_SET_PARAMS
447 4d6443f4 Iustin Pop
+++++++++++++++++++++
448 4d6443f4 Iustin Pop
449 4d6443f4 Iustin Pop
Modifies the cluster parameters.
450 4d6443f4 Iustin Pop
451 4d6443f4 Iustin Pop
:directory: cluster-modify
452 4d6443f4 Iustin Pop
:env. vars: NEW_VG_NAME
453 4d6443f4 Iustin Pop
:pre-execution: master node
454 4d6443f4 Iustin Pop
:post-execution: master node
455 4d6443f4 Iustin Pop
456 ff779c32 Iustin Pop
Virtual operation :pyeval:`constants.FAKE_OP_MASTER_TURNUP`
457 ff779c32 Iustin Pop
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
458 769582be Andrea Spadaccini
459 ff779c32 Iustin Pop
This doesn't correspond to an actual op-code, but it is called when the
460 ff779c32 Iustin Pop
master IP is activated.
461 769582be Andrea Spadaccini
462 769582be Andrea Spadaccini
:directory: master-ip-turnup
463 3a3e4f1e Andrea Spadaccini
:env. vars: MASTER_NETDEV, MASTER_IP, MASTER_NETMASK, CLUSTER_IP_VERSION
464 769582be Andrea Spadaccini
:pre-execution: master node
465 769582be Andrea Spadaccini
:post-execution: master node
466 769582be Andrea Spadaccini
467 ff779c32 Iustin Pop
Virtual operation :pyeval:`constants.FAKE_OP_MASTER_TURNDOWN`
468 ff779c32 Iustin Pop
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
469 769582be Andrea Spadaccini
470 ff779c32 Iustin Pop
This doesn't correspond to an actual op-code, but it is called when the
471 ff779c32 Iustin Pop
master IP is deactivated.
472 769582be Andrea Spadaccini
473 769582be Andrea Spadaccini
:directory: master-ip-turndown
474 3a3e4f1e Andrea Spadaccini
:env. vars: MASTER_NETDEV, MASTER_IP, MASTER_NETMASK, CLUSTER_IP_VERSION
475 769582be Andrea Spadaccini
:pre-execution: master node
476 769582be Andrea Spadaccini
:post-execution: master node
477 769582be Andrea Spadaccini
478 4d6443f4 Iustin Pop
479 4d6443f4 Iustin Pop
Obsolete operations
480 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~~~~~~
481 4d6443f4 Iustin Pop
482 4d6443f4 Iustin Pop
The following operations are no longer present or don't execute hooks
483 4d6443f4 Iustin Pop
anymore in Ganeti 2.0:
484 4d6443f4 Iustin Pop
485 4d6443f4 Iustin Pop
- OP_INIT_CLUSTER
486 4d6443f4 Iustin Pop
- OP_MASTER_FAILOVER
487 4d6443f4 Iustin Pop
- OP_INSTANCE_ADD_MDDRBD
488 4d6443f4 Iustin Pop
- OP_INSTANCE_REMOVE_MDDRBD
489 4d6443f4 Iustin Pop
490 4d6443f4 Iustin Pop
491 4d6443f4 Iustin Pop
Environment variables
492 4d6443f4 Iustin Pop
---------------------
493 4d6443f4 Iustin Pop
494 dd7f6776 Michael Hanselmann
Note that all variables listed here are actually prefixed with *GANETI_*
495 dd7f6776 Michael Hanselmann
in order to provide a clear namespace. In addition, post-execution
496 dd7f6776 Michael Hanselmann
scripts receive another set of variables, prefixed with *GANETI_POST_*,
497 dd7f6776 Michael Hanselmann
representing the status after the opcode executed.
498 4d6443f4 Iustin Pop
499 4d6443f4 Iustin Pop
Common variables
500 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~~~
501 4d6443f4 Iustin Pop
502 4d6443f4 Iustin Pop
This is the list of environment variables supported by all operations:
503 4d6443f4 Iustin Pop
504 4d6443f4 Iustin Pop
HOOKS_VERSION
505 4d6443f4 Iustin Pop
  Documents the hooks interface version. In case this doesnt match
506 4d6443f4 Iustin Pop
  what the script expects, it should not run. The documents conforms
507 4d6443f4 Iustin Pop
  to the version 2.
508 4d6443f4 Iustin Pop
509 4d6443f4 Iustin Pop
HOOKS_PHASE
510 4d6443f4 Iustin Pop
  One of *PRE* or *POST* denoting which phase are we in.
511 4d6443f4 Iustin Pop
512 4d6443f4 Iustin Pop
CLUSTER
513 4d6443f4 Iustin Pop
  The cluster name.
514 4d6443f4 Iustin Pop
515 4d6443f4 Iustin Pop
MASTER
516 4d6443f4 Iustin Pop
  The master node.
517 4d6443f4 Iustin Pop
518 4d6443f4 Iustin Pop
OP_CODE
519 4d6443f4 Iustin Pop
  One of the *OP_* values from the list of operations.
520 4d6443f4 Iustin Pop
521 4d6443f4 Iustin Pop
OBJECT_TYPE
522 4d6443f4 Iustin Pop
  One of ``INSTANCE``, ``NODE``, ``CLUSTER``.
523 4d6443f4 Iustin Pop
524 4d6443f4 Iustin Pop
DATA_DIR
525 4d6443f4 Iustin Pop
  The path to the Ganeti configuration directory (to read, for
526 4d6443f4 Iustin Pop
  example, the *ssconf* files).
527 4d6443f4 Iustin Pop
528 4d6443f4 Iustin Pop
529 4d6443f4 Iustin Pop
Specialised variables
530 4d6443f4 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~
531 4d6443f4 Iustin Pop
532 4d6443f4 Iustin Pop
This is the list of variables which are specific to one or more
533 4d6443f4 Iustin Pop
operations.
534 4d6443f4 Iustin Pop
535 3a3e4f1e Andrea Spadaccini
CLUSTER_IP_VERSION
536 3a3e4f1e Andrea Spadaccini
  IP version of the master IP (4 or 6)
537 3a3e4f1e Andrea Spadaccini
538 4d6443f4 Iustin Pop
INSTANCE_NAME
539 4d6443f4 Iustin Pop
  The name of the instance which is the target of the operation.
540 4d6443f4 Iustin Pop
541 49e4c837 David Knowles
INSTANCE_BE_x,y,z,...
542 49e4c837 David Knowles
  Instance BE params. There is one variable per BE param. For instance, GANETI_INSTANCE_BE_auto_balance
543 49e4c837 David Knowles
544 4d6443f4 Iustin Pop
INSTANCE_DISK_TEMPLATE
545 4d6443f4 Iustin Pop
  The disk type for the instance.
546 4d6443f4 Iustin Pop
547 49e4c837 David Knowles
NEW_DISK_TEMPLATE
548 49e4c837 David Knowles
  The new disk type for the instance.
549 49e4c837 David Knowles
550 4d6443f4 Iustin Pop
INSTANCE_DISK_COUNT
551 4d6443f4 Iustin Pop
  The number of disks for the instance.
552 4d6443f4 Iustin Pop
553 4d6443f4 Iustin Pop
INSTANCE_DISKn_SIZE
554 4d6443f4 Iustin Pop
  The size of disk *n* for the instance.
555 4d6443f4 Iustin Pop
556 4d6443f4 Iustin Pop
INSTANCE_DISKn_MODE
557 4d6443f4 Iustin Pop
  Either *rw* for a read-write disk or *ro* for a read-only one.
558 4d6443f4 Iustin Pop
559 49e4c837 David Knowles
INSTANCE_HV_x,y,z,...
560 49e4c837 David Knowles
  Instance hypervisor options. There is one variable per option. For instance, GANETI_INSTANCE_HV_use_bootloader
561 49e4c837 David Knowles
562 49e4c837 David Knowles
INSTANCE_HYPERVISOR
563 49e4c837 David Knowles
  The instance hypervisor.
564 49e4c837 David Knowles
565 4d6443f4 Iustin Pop
INSTANCE_NIC_COUNT
566 4d6443f4 Iustin Pop
  The number of NICs for the instance.
567 4d6443f4 Iustin Pop
568 4d6443f4 Iustin Pop
INSTANCE_NICn_BRIDGE
569 4d6443f4 Iustin Pop
  The bridge to which the *n* -th NIC of the instance is attached.
570 4d6443f4 Iustin Pop
571 4d6443f4 Iustin Pop
INSTANCE_NICn_IP
572 4d6443f4 Iustin Pop
  The IP (if any) of the *n* -th NIC of the instance.
573 4d6443f4 Iustin Pop
574 4d6443f4 Iustin Pop
INSTANCE_NICn_MAC
575 4d6443f4 Iustin Pop
  The MAC address of the *n* -th NIC of the instance.
576 4d6443f4 Iustin Pop
577 49e4c837 David Knowles
INSTANCE_NICn_MODE
578 49e4c837 David Knowles
  The mode of the *n* -th NIC of the instance.
579 49e4c837 David Knowles
580 4d6443f4 Iustin Pop
INSTANCE_OS_TYPE
581 4d6443f4 Iustin Pop
  The name of the instance OS.
582 4d6443f4 Iustin Pop
583 4d6443f4 Iustin Pop
INSTANCE_PRIMARY
584 08eec276 Iustin Pop
  The name of the node which is the primary for the instance. Note that
585 08eec276 Iustin Pop
  for migrations/failovers, you shouldn't rely on this variable since
586 08eec276 Iustin Pop
  the nodes change during the exectution, but on the
587 08eec276 Iustin Pop
  OLD_PRIMARY/NEW_PRIMARY values.
588 4d6443f4 Iustin Pop
589 dd5e7794 David Knowles
INSTANCE_SECONDARY
590 08eec276 Iustin Pop
  Space-separated list of secondary nodes for the instance. Note that
591 08eec276 Iustin Pop
  for migrations/failovers, you shouldn't rely on this variable since
592 08eec276 Iustin Pop
  the nodes change during the exectution, but on the
593 08eec276 Iustin Pop
  OLD_SECONDARY/NEW_SECONDARY values.
594 4d6443f4 Iustin Pop
595 4d6443f4 Iustin Pop
INSTANCE_MEMORY
596 4d6443f4 Iustin Pop
  The memory size (in MiBs) of the instance.
597 4d6443f4 Iustin Pop
598 4d6443f4 Iustin Pop
INSTANCE_VCPUS
599 4d6443f4 Iustin Pop
  The number of virtual CPUs for the instance.
600 4d6443f4 Iustin Pop
601 4d6443f4 Iustin Pop
INSTANCE_STATUS
602 4d6443f4 Iustin Pop
  The run status of the instance.
603 4d6443f4 Iustin Pop
604 49e4c837 David Knowles
MASTER_CAPABLE
605 49e4c837 David Knowles
  Whether a node is capable of being promoted to master.
606 49e4c837 David Knowles
607 49e4c837 David Knowles
VM_CAPABLE
608 49e4c837 David Knowles
  Whether the node can host instances.
609 49e4c837 David Knowles
610 769582be Andrea Spadaccini
MASTER_NETDEV
611 769582be Andrea Spadaccini
  Network device of the master IP
612 769582be Andrea Spadaccini
613 769582be Andrea Spadaccini
MASTER_IP
614 769582be Andrea Spadaccini
  The master IP
615 769582be Andrea Spadaccini
616 3a3e4f1e Andrea Spadaccini
MASTER_NETMASK
617 3a3e4f1e Andrea Spadaccini
  Netmask of the master IP
618 3a3e4f1e Andrea Spadaccini
619 9dfa16fc Apollon Oikonomopoulos
INSTANCE_TAGS
620 9dfa16fc Apollon Oikonomopoulos
  A space-delimited list of the instance's tags.
621 9dfa16fc Apollon Oikonomopoulos
622 4d6443f4 Iustin Pop
NODE_NAME
623 4d6443f4 Iustin Pop
  The target node of this operation (not the node on which the hook
624 4d6443f4 Iustin Pop
  runs).
625 4d6443f4 Iustin Pop
626 4d6443f4 Iustin Pop
NODE_PIP
627 4d6443f4 Iustin Pop
  The primary IP of the target node (the one over which inter-node
628 4d6443f4 Iustin Pop
  communication is done).
629 4d6443f4 Iustin Pop
630 4d6443f4 Iustin Pop
NODE_SIP
631 4d6443f4 Iustin Pop
  The secondary IP of the target node (the one over which drbd
632 4d6443f4 Iustin Pop
  replication is done). This can be equal to the primary ip, in case
633 4d6443f4 Iustin Pop
  the cluster is not dual-homed.
634 4d6443f4 Iustin Pop
635 4d6443f4 Iustin Pop
FORCE
636 4d6443f4 Iustin Pop
  This is provided by some operations when the user gave this flag.
637 4d6443f4 Iustin Pop
638 4d6443f4 Iustin Pop
IGNORE_CONSISTENCY
639 4d6443f4 Iustin Pop
  The user has specified this flag. It is used when failing over
640 4d6443f4 Iustin Pop
  instances in case the primary node is down.
641 4d6443f4 Iustin Pop
642 4d6443f4 Iustin Pop
ADD_MODE
643 4d6443f4 Iustin Pop
  The mode of the instance create: either *create* for create from
644 4d6443f4 Iustin Pop
  scratch or *import* for restoring from an exported image.
645 4d6443f4 Iustin Pop
646 4d6443f4 Iustin Pop
SRC_NODE, SRC_PATH, SRC_IMAGE
647 4d6443f4 Iustin Pop
  In case the instance has been added by import, these variables are
648 4d6443f4 Iustin Pop
  defined and point to the source node, source path (the directory
649 4d6443f4 Iustin Pop
  containing the image and the config file) and the source disk image
650 4d6443f4 Iustin Pop
  file.
651 4d6443f4 Iustin Pop
652 4d6443f4 Iustin Pop
NEW_SECONDARY
653 4d6443f4 Iustin Pop
  The name of the node on which the new mirror component is being
654 08eec276 Iustin Pop
  added (for replace disk). This can be the name of the current
655 08eec276 Iustin Pop
  secondary, if the new mirror is on the same secondary. For
656 08eec276 Iustin Pop
  migrations/failovers, this is the old primary node.
657 4d6443f4 Iustin Pop
658 4d6443f4 Iustin Pop
OLD_SECONDARY
659 08eec276 Iustin Pop
  The name of the old secondary in the replace-disks command. Note that
660 4d6443f4 Iustin Pop
  this can be equal to the new secondary if the secondary node hasn't
661 08eec276 Iustin Pop
  actually changed. For migrations/failovers, this is the new primary
662 08eec276 Iustin Pop
  node.
663 08eec276 Iustin Pop
664 08eec276 Iustin Pop
OLD_PRIMARY, NEW_PRIMARY
665 08eec276 Iustin Pop
  For migrations/failovers, the old and respectively new primary
666 08eec276 Iustin Pop
  nodes. These two mirror the NEW_SECONDARY/OLD_SECONDARY variables
667 4d6443f4 Iustin Pop
668 49e4c837 David Knowles
EXPORT_MODE
669 49e4c837 David Knowles
  The instance export mode. Either "remote" or "local".
670 49e4c837 David Knowles
671 4d6443f4 Iustin Pop
EXPORT_NODE
672 4d6443f4 Iustin Pop
  The node on which the exported image of the instance was done.
673 4d6443f4 Iustin Pop
674 4d6443f4 Iustin Pop
EXPORT_DO_SHUTDOWN
675 4d6443f4 Iustin Pop
  This variable tells if the instance has been shutdown or not while
676 4d6443f4 Iustin Pop
  doing the export. In the "was shutdown" case, it's likely that the
677 4d6443f4 Iustin Pop
  filesystem is consistent, whereas in the "did not shutdown" case,
678 4d6443f4 Iustin Pop
  the filesystem would need a check (journal replay or full fsck) in
679 4d6443f4 Iustin Pop
  order to guarantee consistency.
680 4d6443f4 Iustin Pop
681 49e4c837 David Knowles
REMOVE_INSTANCE
682 49e4c837 David Knowles
  Whether the instance was removed from the node.
683 49e4c837 David Knowles
684 49e4c837 David Knowles
SHUTDOWN_TIMEOUT
685 49e4c837 David Knowles
  Amount of time to wait for the instance to shutdown.
686 49e4c837 David Knowles
687 49e4c837 David Knowles
TIMEOUT
688 49e4c837 David Knowles
  Amount of time to wait before aborting the op.
689 49e4c837 David Knowles
690 49e4c837 David Knowles
OLD_NAME, NEW_NAME
691 49e4c837 David Knowles
  Old/new name of the node group.
692 49e4c837 David Knowles
693 49e4c837 David Knowles
GROUP_NAME
694 49e4c837 David Knowles
  The name of the node group.
695 49e4c837 David Knowles
696 49e4c837 David Knowles
NEW_ALLOC_POLICY
697 49e4c837 David Knowles
  The new allocation policy for the node group.
698 49e4c837 David Knowles
699 35e994e9 Iustin Pop
CLUSTER_TAGS
700 35e994e9 Iustin Pop
  The list of cluster tags, space separated.
701 35e994e9 Iustin Pop
702 35e994e9 Iustin Pop
NODE_TAGS_<name>
703 35e994e9 Iustin Pop
  The list of tags for node *<name>*, space separated.
704 35e994e9 Iustin Pop
705 4d6443f4 Iustin Pop
Examples
706 4d6443f4 Iustin Pop
--------
707 4d6443f4 Iustin Pop
708 4d6443f4 Iustin Pop
The startup of an instance will pass this environment to the hook
709 4d6443f4 Iustin Pop
script::
710 4d6443f4 Iustin Pop
711 4d6443f4 Iustin Pop
  GANETI_CLUSTER=cluster1.example.com
712 4d6443f4 Iustin Pop
  GANETI_DATA_DIR=/var/lib/ganeti
713 4d6443f4 Iustin Pop
  GANETI_FORCE=False
714 4d6443f4 Iustin Pop
  GANETI_HOOKS_PATH=instance-start
715 4d6443f4 Iustin Pop
  GANETI_HOOKS_PHASE=post
716 4d6443f4 Iustin Pop
  GANETI_HOOKS_VERSION=2
717 4d6443f4 Iustin Pop
  GANETI_INSTANCE_DISK0_MODE=rw
718 4d6443f4 Iustin Pop
  GANETI_INSTANCE_DISK0_SIZE=128
719 4d6443f4 Iustin Pop
  GANETI_INSTANCE_DISK_COUNT=1
720 4d6443f4 Iustin Pop
  GANETI_INSTANCE_DISK_TEMPLATE=drbd
721 4d6443f4 Iustin Pop
  GANETI_INSTANCE_MEMORY=128
722 4d6443f4 Iustin Pop
  GANETI_INSTANCE_NAME=instance2.example.com
723 4d6443f4 Iustin Pop
  GANETI_INSTANCE_NIC0_BRIDGE=xen-br0
724 4d6443f4 Iustin Pop
  GANETI_INSTANCE_NIC0_IP=
725 4d6443f4 Iustin Pop
  GANETI_INSTANCE_NIC0_MAC=aa:00:00:a5:91:58
726 4d6443f4 Iustin Pop
  GANETI_INSTANCE_NIC_COUNT=1
727 4d6443f4 Iustin Pop
  GANETI_INSTANCE_OS_TYPE=debootstrap
728 4d6443f4 Iustin Pop
  GANETI_INSTANCE_PRIMARY=node3.example.com
729 dd5e7794 David Knowles
  GANETI_INSTANCE_SECONDARY=node5.example.com
730 4d6443f4 Iustin Pop
  GANETI_INSTANCE_STATUS=down
731 4d6443f4 Iustin Pop
  GANETI_INSTANCE_VCPUS=1
732 4d6443f4 Iustin Pop
  GANETI_MASTER=node1.example.com
733 4d6443f4 Iustin Pop
  GANETI_OBJECT_TYPE=INSTANCE
734 4d6443f4 Iustin Pop
  GANETI_OP_CODE=OP_INSTANCE_STARTUP
735 4d6443f4 Iustin Pop
  GANETI_OP_TARGET=instance2.example.com
736 558fd122 Michael Hanselmann
737 558fd122 Michael Hanselmann
.. vim: set textwidth=72 :
738 08eec276 Iustin Pop
.. Local Variables:
739 08eec276 Iustin Pop
.. mode: rst
740 08eec276 Iustin Pop
.. fill-column: 72
741 08eec276 Iustin Pop
.. End: