Statistics
| Branch: | Tag: | Revision:

root / doc / iallocator.rst @ f154a7a3

History | View | Annotate | Download (11.8 kB)

1 876860a3 Iustin Pop
Ganeti automatic instance allocation
2 876860a3 Iustin Pop
====================================
3 876860a3 Iustin Pop
4 876860a3 Iustin Pop
Documents Ganeti version 2.0
5 876860a3 Iustin Pop
6 876860a3 Iustin Pop
.. contents::
7 876860a3 Iustin Pop
8 876860a3 Iustin Pop
Introduction
9 876860a3 Iustin Pop
------------
10 876860a3 Iustin Pop
11 876860a3 Iustin Pop
Currently in Ganeti the admin has to specify the exact locations for
12 876860a3 Iustin Pop
an instance's node(s). This prevents a completely automatic node
13 876860a3 Iustin Pop
evacuation, and is in general a nuisance.
14 876860a3 Iustin Pop
15 876860a3 Iustin Pop
The *iallocator* framework will enable automatic placement via
16 876860a3 Iustin Pop
external scripts, which allows customization of the cluster layout per
17 876860a3 Iustin Pop
the site's requirements.
18 876860a3 Iustin Pop
19 876860a3 Iustin Pop
User-visible changes
20 876860a3 Iustin Pop
~~~~~~~~~~~~~~~~~~~~
21 876860a3 Iustin Pop
22 876860a3 Iustin Pop
There are two parts of the ganeti operation that are impacted by the
23 876860a3 Iustin Pop
auto-allocation: how the cluster knows what the allocator algorithms
24 876860a3 Iustin Pop
are and how the admin uses these in creating instances.
25 876860a3 Iustin Pop
26 876860a3 Iustin Pop
An allocation algorithm is just the filename of a program installed in
27 876860a3 Iustin Pop
a defined list of directories.
28 876860a3 Iustin Pop
29 876860a3 Iustin Pop
Cluster configuration
30 876860a3 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~
31 876860a3 Iustin Pop
32 876860a3 Iustin Pop
At configure time, the list of the directories can be selected via the
33 876860a3 Iustin Pop
``--with-iallocator-search-path=LIST`` option, where *LIST* is a
34 876860a3 Iustin Pop
comma-separated list of directories. If not given, this defaults to
35 876860a3 Iustin Pop
``$libdir/ganeti/iallocators``, i.e. for an installation under
36 876860a3 Iustin Pop
``/usr``, this will be ``/usr/lib/ganeti/iallocators``.
37 876860a3 Iustin Pop
38 876860a3 Iustin Pop
Ganeti will then search for allocator script in the configured list,
39 876860a3 Iustin Pop
using the first one whose filename matches the one given by the user.
40 876860a3 Iustin Pop
41 876860a3 Iustin Pop
Command line interface changes
42 876860a3 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43 876860a3 Iustin Pop
44 876860a3 Iustin Pop
The node selection options in instanece add and instance replace disks
45 876860a3 Iustin Pop
can be replace by the new ``--iallocator=NAME`` option (shortened to
46 876860a3 Iustin Pop
``-I``), which will cause the auto-assignement of nodes with the
47 876860a3 Iustin Pop
passed iallocator. The selected node(s) will be show as part of the
48 876860a3 Iustin Pop
command output.
49 876860a3 Iustin Pop
50 876860a3 Iustin Pop
IAllocator API
51 876860a3 Iustin Pop
--------------
52 876860a3 Iustin Pop
53 876860a3 Iustin Pop
The protocol for communication between Ganeti and an allocator script
54 876860a3 Iustin Pop
will be the following:
55 876860a3 Iustin Pop
56 876860a3 Iustin Pop
#. ganeti launches the program with a single argument, a filename that
57 876860a3 Iustin Pop
   contains a JSON-encoded structure (the input message)
58 876860a3 Iustin Pop
59 876860a3 Iustin Pop
#. if the script finishes with exit code different from zero, it is
60 876860a3 Iustin Pop
   considered a general failure and the full output will be reported to
61 876860a3 Iustin Pop
   the users; this can be the case when the allocator can't parse the
62 876860a3 Iustin Pop
   input message
63 876860a3 Iustin Pop
64 876860a3 Iustin Pop
#. if the allocator finishes with exit code zero, it is expected to
65 876860a3 Iustin Pop
   output (on its stdout) a JSON-encoded structure (the response)
66 876860a3 Iustin Pop
67 876860a3 Iustin Pop
Input message
68 876860a3 Iustin Pop
~~~~~~~~~~~~~
69 876860a3 Iustin Pop
70 876860a3 Iustin Pop
The input message will be the JSON encoding of a dictionary containing
71 876860a3 Iustin Pop
the following:
72 876860a3 Iustin Pop
73 876860a3 Iustin Pop
version
74 876860a3 Iustin Pop
  the version of the protocol; this document
75 77031881 Iustin Pop
  specifies version 2
76 876860a3 Iustin Pop
77 876860a3 Iustin Pop
cluster_name
78 876860a3 Iustin Pop
  the cluster name
79 876860a3 Iustin Pop
80 876860a3 Iustin Pop
cluster_tags
81 876860a3 Iustin Pop
  the list of cluster tags
82 876860a3 Iustin Pop
83 77031881 Iustin Pop
enabled_hypervisors
84 77031881 Iustin Pop
  the list of enabled hypervisors
85 77031881 Iustin Pop
86 876860a3 Iustin Pop
request
87 876860a3 Iustin Pop
  a dictionary containing the request data:
88 876860a3 Iustin Pop
89 876860a3 Iustin Pop
  type
90 876860a3 Iustin Pop
    the request type; this can be either ``allocate`` or ``relocate``;
91 876860a3 Iustin Pop
    the ``allocate`` request is used when a new instance needs to be
92 876860a3 Iustin Pop
    placed on the cluster, while the ``relocate`` request is used when
93 876860a3 Iustin Pop
    an existing instance needs to be moved within the cluster
94 876860a3 Iustin Pop
95 876860a3 Iustin Pop
  name
96 876860a3 Iustin Pop
    the name of the instance; if the request is a realocation, then
97 876860a3 Iustin Pop
    this name will be found in the list of instances (see below),
98 876860a3 Iustin Pop
    otherwise is the FQDN of the new instance
99 876860a3 Iustin Pop
100 876860a3 Iustin Pop
  required_nodes
101 876860a3 Iustin Pop
    how many nodes should the algorithm return; while this information
102 876860a3 Iustin Pop
    can be deduced from the instace's disk template, it's better if
103 876860a3 Iustin Pop
    this computation is left to Ganeti as then allocator scripts are
104 876860a3 Iustin Pop
    less sensitive to changes to the disk templates
105 876860a3 Iustin Pop
106 876860a3 Iustin Pop
  disk_space_total
107 876860a3 Iustin Pop
    the total disk space that will be used by this instance on the
108 876860a3 Iustin Pop
    (new) nodes; again, this information can be computed from the list
109 876860a3 Iustin Pop
    of instance disks and its template type, but Ganeti is better
110 876860a3 Iustin Pop
    suited to compute it
111 876860a3 Iustin Pop
112 876860a3 Iustin Pop
  If the request is an allocation, then there are extra fields in the
113 876860a3 Iustin Pop
  request dictionary:
114 876860a3 Iustin Pop
115 876860a3 Iustin Pop
  disks
116 876860a3 Iustin Pop
    list of dictionaries holding the disk definitions for this
117 876860a3 Iustin Pop
    instance (in the order they are exported to the hypervisor):
118 876860a3 Iustin Pop
119 876860a3 Iustin Pop
    mode
120 876860a3 Iustin Pop
      either ``r`` or ``w`` denoting if the disk is read-only or
121 876860a3 Iustin Pop
      writable
122 876860a3 Iustin Pop
123 876860a3 Iustin Pop
    size
124 876860a3 Iustin Pop
      the size of this disk in mebibytes
125 876860a3 Iustin Pop
126 876860a3 Iustin Pop
  nics
127 876860a3 Iustin Pop
    a list of dictionaries holding the network interfaces for this
128 876860a3 Iustin Pop
    instance, containing:
129 876860a3 Iustin Pop
130 876860a3 Iustin Pop
    ip
131 876860a3 Iustin Pop
      the IP address that Ganeti know for this instance, or null
132 876860a3 Iustin Pop
133 876860a3 Iustin Pop
    mac
134 876860a3 Iustin Pop
      the MAC address for this interface
135 876860a3 Iustin Pop
136 876860a3 Iustin Pop
    bridge
137 876860a3 Iustin Pop
      the bridge to which this interface will be connected
138 876860a3 Iustin Pop
139 876860a3 Iustin Pop
  vcpus
140 876860a3 Iustin Pop
    the number of VCPUs for the instance
141 876860a3 Iustin Pop
142 876860a3 Iustin Pop
  disk_template
143 876860a3 Iustin Pop
    the disk template for the instance
144 876860a3 Iustin Pop
145 876860a3 Iustin Pop
  memory
146 876860a3 Iustin Pop
   the memory size for the instance
147 876860a3 Iustin Pop
148 876860a3 Iustin Pop
  os
149 876860a3 Iustin Pop
   the OS type for the instance
150 876860a3 Iustin Pop
151 876860a3 Iustin Pop
  tags
152 876860a3 Iustin Pop
    the list of the instance's tags
153 876860a3 Iustin Pop
154 77031881 Iustin Pop
  hypervisor
155 77031881 Iustin Pop
    the hypervisor of this instance
156 77031881 Iustin Pop
157 876860a3 Iustin Pop
158 876860a3 Iustin Pop
  If the request is of type relocate, then there is one more entry in
159 876860a3 Iustin Pop
  the request dictionary, named ``relocate_from``, and it contains a
160 876860a3 Iustin Pop
  list of nodes to move the instance away from; note that with Ganeti
161 876860a3 Iustin Pop
  2.0, this list will always contain a single node, the current
162 876860a3 Iustin Pop
  secondary of the instance.
163 876860a3 Iustin Pop
164 876860a3 Iustin Pop
instances
165 876860a3 Iustin Pop
  a dictionary with the data for the current existing instance on the
166 876860a3 Iustin Pop
  cluster, indexed by instance name; the contents are similar to the
167 876860a3 Iustin Pop
  instance definitions for the allocate mode, with the addition of:
168 876860a3 Iustin Pop
169 77031881 Iustin Pop
  admin_up
170 876860a3 Iustin Pop
    if this instance is set to run (but not the actual status of the
171 876860a3 Iustin Pop
    instance)
172 876860a3 Iustin Pop
173 876860a3 Iustin Pop
  nodes
174 876860a3 Iustin Pop
    list of nodes on which this instance is placed; the primary node
175 876860a3 Iustin Pop
    of the instance is always the first one
176 876860a3 Iustin Pop
177 876860a3 Iustin Pop
nodes
178 876860a3 Iustin Pop
  dictionary with the data for the nodes in the cluster, indexed by
179 0d853843 Iustin Pop
  the node name; the dict contains [*]_ :
180 876860a3 Iustin Pop
181 876860a3 Iustin Pop
  total_disk
182 876860a3 Iustin Pop
    the total disk size of this node (mebibytes)
183 876860a3 Iustin Pop
184 876860a3 Iustin Pop
  free_disk
185 876860a3 Iustin Pop
    the free disk space on the node
186 876860a3 Iustin Pop
187 876860a3 Iustin Pop
  total_memory
188 876860a3 Iustin Pop
    the total memory size
189 876860a3 Iustin Pop
190 876860a3 Iustin Pop
  free_memory
191 876860a3 Iustin Pop
    free memory on the node; note that currently this does not take
192 876860a3 Iustin Pop
    into account the instances which are down on the node
193 876860a3 Iustin Pop
194 876860a3 Iustin Pop
  total_cpus
195 876860a3 Iustin Pop
    the physical number of CPUs present on the machine; depending on
196 876860a3 Iustin Pop
    the hypervisor, this might or might not be equal to how many CPUs
197 876860a3 Iustin Pop
    the node operating system sees;
198 876860a3 Iustin Pop
199 876860a3 Iustin Pop
  primary_ip
200 876860a3 Iustin Pop
    the primary IP address of the node
201 876860a3 Iustin Pop
202 876860a3 Iustin Pop
  secondary_ip
203 876860a3 Iustin Pop
    the secondary IP address of the node (the one used for the DRBD
204 876860a3 Iustin Pop
    replication); note that this can be the same as the primary one
205 876860a3 Iustin Pop
206 876860a3 Iustin Pop
  tags
207 876860a3 Iustin Pop
    list with the tags of the node
208 876860a3 Iustin Pop
209 77031881 Iustin Pop
  master_candidate:
210 77031881 Iustin Pop
    a boolean flag denoting whether this node is a master candidate
211 77031881 Iustin Pop
212 77031881 Iustin Pop
  drained:
213 77031881 Iustin Pop
    a boolean flag denoting whether this node is being drained
214 77031881 Iustin Pop
215 77031881 Iustin Pop
  offline:
216 77031881 Iustin Pop
    a boolean flag denoting whether this node is offline
217 77031881 Iustin Pop
218 77031881 Iustin Pop
  i_pri_memory:
219 77031881 Iustin Pop
    total memory required by primary instances
220 77031881 Iustin Pop
221 77031881 Iustin Pop
  i_pri_up_memory:
222 77031881 Iustin Pop
    total memory required by running primary instances
223 77031881 Iustin Pop
224 77031881 Iustin Pop
  No allocations should be made on nodes having either the ``drained``
225 77031881 Iustin Pop
  or ``offline`` flags set. More details about these of node status
226 fd07c6b3 Iustin Pop
  flags is available in the manpage :manpage:`ganeti(7)`.
227 77031881 Iustin Pop
228 7faf5110 Michael Hanselmann
.. [*] Note that no run-time data is present for offline or drained
229 7faf5110 Michael Hanselmann
   nodes; this means the tags total_memory, reserved_memory,
230 7faf5110 Michael Hanselmann
   free_memory, total_disk, free_disk, total_cpus, i_pri_memory and
231 7faf5110 Michael Hanselmann
   i_pri_up memory will be absent
232 77031881 Iustin Pop
233 0d853843 Iustin Pop
234 0d853843 Iustin Pop
Response message
235 0d853843 Iustin Pop
~~~~~~~~~~~~~~~~
236 876860a3 Iustin Pop
237 876860a3 Iustin Pop
The response message is much more simple than the input one. It is
238 876860a3 Iustin Pop
also a dict having three keys:
239 876860a3 Iustin Pop
240 876860a3 Iustin Pop
success
241 5bbd3f7f Michael Hanselmann
  a boolean value denoting if the allocation was successful or not
242 876860a3 Iustin Pop
243 876860a3 Iustin Pop
info
244 876860a3 Iustin Pop
  a string with information from the scripts; if the allocation fails,
245 876860a3 Iustin Pop
  this will be shown to the user
246 876860a3 Iustin Pop
247 876860a3 Iustin Pop
nodes
248 876860a3 Iustin Pop
  the list of nodes computed by the algorithm; even if the algorithm
249 876860a3 Iustin Pop
  failed (i.e. success is false), this must be returned as an empty
250 876860a3 Iustin Pop
  list; also note that the length of this list must equal the
251 876860a3 Iustin Pop
  ``requested_nodes`` entry in the input message, otherwise Ganeti
252 876860a3 Iustin Pop
  will consider the result as failed
253 876860a3 Iustin Pop
254 876860a3 Iustin Pop
Examples
255 876860a3 Iustin Pop
--------
256 876860a3 Iustin Pop
257 876860a3 Iustin Pop
Input messages to scripts
258 876860a3 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~~~~~
259 876860a3 Iustin Pop
260 876860a3 Iustin Pop
Input message, new instance allocation::
261 876860a3 Iustin Pop
262 876860a3 Iustin Pop
  {
263 876860a3 Iustin Pop
    "cluster_tags": [],
264 876860a3 Iustin Pop
    "request": {
265 876860a3 Iustin Pop
      "required_nodes": 2,
266 876860a3 Iustin Pop
      "name": "instance3.example.com",
267 876860a3 Iustin Pop
      "tags": [
268 876860a3 Iustin Pop
        "type:test",
269 876860a3 Iustin Pop
        "owner:foo"
270 876860a3 Iustin Pop
      ],
271 876860a3 Iustin Pop
      "type": "allocate",
272 876860a3 Iustin Pop
      "disks": [
273 876860a3 Iustin Pop
        {
274 876860a3 Iustin Pop
          "mode": "w",
275 876860a3 Iustin Pop
          "size": 1024
276 876860a3 Iustin Pop
        },
277 876860a3 Iustin Pop
        {
278 876860a3 Iustin Pop
          "mode": "w",
279 876860a3 Iustin Pop
          "size": 2048
280 876860a3 Iustin Pop
        }
281 876860a3 Iustin Pop
      ],
282 876860a3 Iustin Pop
      "nics": [
283 876860a3 Iustin Pop
        {
284 876860a3 Iustin Pop
          "ip": null,
285 876860a3 Iustin Pop
          "mac": "00:11:22:33:44:55",
286 876860a3 Iustin Pop
          "bridge": null
287 876860a3 Iustin Pop
        }
288 876860a3 Iustin Pop
      ],
289 876860a3 Iustin Pop
      "vcpus": 1,
290 876860a3 Iustin Pop
      "disk_template": "drbd",
291 876860a3 Iustin Pop
      "memory": 2048,
292 876860a3 Iustin Pop
      "disk_space_total": 3328,
293 876860a3 Iustin Pop
      "os": "etch-image"
294 876860a3 Iustin Pop
    },
295 876860a3 Iustin Pop
    "cluster_name": "cluster1.example.com",
296 876860a3 Iustin Pop
    "instances": {
297 876860a3 Iustin Pop
      "instance1.example.com": {
298 876860a3 Iustin Pop
        "tags": [],
299 876860a3 Iustin Pop
        "should_run": false,
300 876860a3 Iustin Pop
        "disks": [
301 876860a3 Iustin Pop
          {
302 876860a3 Iustin Pop
            "mode": "w",
303 876860a3 Iustin Pop
            "size": 64
304 876860a3 Iustin Pop
          },
305 876860a3 Iustin Pop
          {
306 876860a3 Iustin Pop
            "mode": "w",
307 876860a3 Iustin Pop
            "size": 512
308 876860a3 Iustin Pop
          }
309 876860a3 Iustin Pop
        ],
310 876860a3 Iustin Pop
        "nics": [
311 876860a3 Iustin Pop
          {
312 876860a3 Iustin Pop
            "ip": null,
313 876860a3 Iustin Pop
            "mac": "aa:00:00:00:60:bf",
314 876860a3 Iustin Pop
            "bridge": "xen-br0"
315 876860a3 Iustin Pop
          }
316 876860a3 Iustin Pop
        ],
317 876860a3 Iustin Pop
        "vcpus": 1,
318 876860a3 Iustin Pop
        "disk_template": "plain",
319 876860a3 Iustin Pop
        "memory": 128,
320 876860a3 Iustin Pop
        "nodes": [
321 876860a3 Iustin Pop
          "nodee1.com"
322 876860a3 Iustin Pop
        ],
323 876860a3 Iustin Pop
        "os": "etch-image"
324 876860a3 Iustin Pop
      },
325 876860a3 Iustin Pop
      "instance2.example.com": {
326 876860a3 Iustin Pop
        "tags": [],
327 876860a3 Iustin Pop
        "should_run": false,
328 876860a3 Iustin Pop
        "disks": [
329 876860a3 Iustin Pop
          {
330 876860a3 Iustin Pop
            "mode": "w",
331 876860a3 Iustin Pop
            "size": 512
332 876860a3 Iustin Pop
          },
333 876860a3 Iustin Pop
          {
334 876860a3 Iustin Pop
            "mode": "w",
335 876860a3 Iustin Pop
            "size": 256
336 876860a3 Iustin Pop
          }
337 876860a3 Iustin Pop
        ],
338 876860a3 Iustin Pop
        "nics": [
339 876860a3 Iustin Pop
          {
340 876860a3 Iustin Pop
            "ip": null,
341 876860a3 Iustin Pop
            "mac": "aa:00:00:55:f8:38",
342 876860a3 Iustin Pop
            "bridge": "xen-br0"
343 876860a3 Iustin Pop
          }
344 876860a3 Iustin Pop
        ],
345 876860a3 Iustin Pop
        "vcpus": 1,
346 876860a3 Iustin Pop
        "disk_template": "drbd",
347 876860a3 Iustin Pop
        "memory": 512,
348 876860a3 Iustin Pop
        "nodes": [
349 876860a3 Iustin Pop
          "node2.example.com",
350 876860a3 Iustin Pop
          "node3.example.com"
351 876860a3 Iustin Pop
        ],
352 876860a3 Iustin Pop
        "os": "etch-image"
353 876860a3 Iustin Pop
      }
354 876860a3 Iustin Pop
    },
355 876860a3 Iustin Pop
    "version": 1,
356 876860a3 Iustin Pop
    "nodes": {
357 876860a3 Iustin Pop
      "node1.example.com": {
358 876860a3 Iustin Pop
        "total_disk": 858276,
359 876860a3 Iustin Pop
        "primary_ip": "192.168.1.1",
360 876860a3 Iustin Pop
        "secondary_ip": "192.168.2.1",
361 876860a3 Iustin Pop
        "tags": [],
362 876860a3 Iustin Pop
        "free_memory": 3505,
363 876860a3 Iustin Pop
        "free_disk": 856740,
364 876860a3 Iustin Pop
        "total_memory": 4095
365 876860a3 Iustin Pop
      },
366 876860a3 Iustin Pop
      "node2.example.com": {
367 876860a3 Iustin Pop
        "total_disk": 858240,
368 876860a3 Iustin Pop
        "primary_ip": "192.168.1.3",
369 876860a3 Iustin Pop
        "secondary_ip": "192.168.2.3",
370 876860a3 Iustin Pop
        "tags": ["test"],
371 876860a3 Iustin Pop
        "free_memory": 3505,
372 876860a3 Iustin Pop
        "free_disk": 848320,
373 876860a3 Iustin Pop
        "total_memory": 4095
374 876860a3 Iustin Pop
      },
375 876860a3 Iustin Pop
      "node3.example.com.com": {
376 876860a3 Iustin Pop
        "total_disk": 572184,
377 876860a3 Iustin Pop
        "primary_ip": "192.168.1.3",
378 876860a3 Iustin Pop
        "secondary_ip": "192.168.2.3",
379 876860a3 Iustin Pop
        "tags": [],
380 876860a3 Iustin Pop
        "free_memory": 3505,
381 876860a3 Iustin Pop
        "free_disk": 570648,
382 876860a3 Iustin Pop
        "total_memory": 4095
383 876860a3 Iustin Pop
      }
384 876860a3 Iustin Pop
    }
385 876860a3 Iustin Pop
  }
386 876860a3 Iustin Pop
387 876860a3 Iustin Pop
Input message, reallocation. Since only the request entry in the input
388 876860a3 Iustin Pop
message is changed, we show only this changed entry::
389 876860a3 Iustin Pop
390 876860a3 Iustin Pop
  "request": {
391 876860a3 Iustin Pop
    "relocate_from": [
392 876860a3 Iustin Pop
      "node3.example.com"
393 876860a3 Iustin Pop
    ],
394 876860a3 Iustin Pop
    "required_nodes": 1,
395 876860a3 Iustin Pop
    "type": "relocate",
396 876860a3 Iustin Pop
    "name": "instance2.example.com",
397 876860a3 Iustin Pop
    "disk_space_total": 832
398 876860a3 Iustin Pop
  },
399 876860a3 Iustin Pop
400 876860a3 Iustin Pop
401 876860a3 Iustin Pop
Response messages
402 876860a3 Iustin Pop
~~~~~~~~~~~~~~~~~
403 876860a3 Iustin Pop
Successful response message::
404 876860a3 Iustin Pop
405 876860a3 Iustin Pop
  {
406 876860a3 Iustin Pop
    "info": "Allocation successful",
407 876860a3 Iustin Pop
    "nodes": [
408 876860a3 Iustin Pop
      "node2.example.com",
409 876860a3 Iustin Pop
      "node1.example.com"
410 876860a3 Iustin Pop
    ],
411 876860a3 Iustin Pop
    "success": true
412 876860a3 Iustin Pop
  }
413 876860a3 Iustin Pop
414 876860a3 Iustin Pop
Failed response message::
415 876860a3 Iustin Pop
416 876860a3 Iustin Pop
  {
417 876860a3 Iustin Pop
    "info": "Can't find a suitable node for position 2 (already selected: node2.example.com)",
418 876860a3 Iustin Pop
    "nodes": [],
419 876860a3 Iustin Pop
    "success": false
420 876860a3 Iustin Pop
  }
421 876860a3 Iustin Pop
422 876860a3 Iustin Pop
Command line messages
423 876860a3 Iustin Pop
~~~~~~~~~~~~~~~~~~~~~
424 876860a3 Iustin Pop
::
425 876860a3 Iustin Pop
426 876860a3 Iustin Pop
  # gnt-instance add -t plain -m 2g --os-size 1g --swap-size 512m --iallocator dumb-allocator -o etch-image instance3
427 876860a3 Iustin Pop
  Selected nodes for the instance: node1.example.com
428 876860a3 Iustin Pop
  * creating instance disks...
429 876860a3 Iustin Pop
  [...]
430 876860a3 Iustin Pop
431 876860a3 Iustin Pop
  # gnt-instance add -t plain -m 3400m --os-size 1g --swap-size 512m --iallocator dumb-allocator -o etch-image instance4
432 876860a3 Iustin Pop
  Failure: prerequisites not met for this operation:
433 876860a3 Iustin Pop
  Can't compute nodes using iallocator 'dumb-allocator': Can't find a suitable node for position 1 (already selected: )
434 876860a3 Iustin Pop
435 876860a3 Iustin Pop
  # gnt-instance add -t drbd -m 1400m --os-size 1g --swap-size 512m --iallocator dumb-allocator -o etch-image instance5
436 876860a3 Iustin Pop
  Failure: prerequisites not met for this operation:
437 876860a3 Iustin Pop
  Can't compute nodes using iallocator 'dumb-allocator': Can't find a suitable node for position 2 (already selected: node1.example.com)
438 558fd122 Michael Hanselmann
439 558fd122 Michael Hanselmann
.. vim: set textwidth=72 :