Revision 3bd3d643

b/doc/design-2.1.rst
268 268
discarded and reset to the default (or passed) values, unless a special
269 269
--keep-known-os-parameters flag is passed.
270 270

  
271
IAllocator changes
272
~~~~~~~~~~~~~~~~~~
273

  
274
Current State and shortcomings
275
++++++++++++++++++++++++++++++
276

  
277
The iallocator interface allows creation of instances without manually
278
specifying nodes, but instead by specifying plugins which will do the
279
required computations and produce a valid node list.
280

  
281
However, the interface is quite akward to use:
282

  
283
- one cannot set a 'default' iallocator script
284
- one cannot use it to easily test if allocation would succeed
285
- some new functionality, such as rebalancing clusters and calculating
286
  capacity estimates is needed
287

  
288
Proposed changes
289
++++++++++++++++
290

  
291
There are two area of improvements proposed:
292

  
293
- improving the use of the current interface
294
- extending the IAllocator API to cover more automation
295

  
296

  
297
Default iallocator names
298
^^^^^^^^^^^^^^^^^^^^^^^^
299

  
300
The cluster will hold, for each type of iallocator, a (possibly empty)
301
list of modules that will be used automatically.
302

  
303
If the list is empty, the behaviour will remain the same.
304

  
305
If the list has one entry, then ganeti will behave as if
306
'--iallocator' was specifyed on the command line. I.e. use this
307
allocator by default. If the user however passed nodes, those will be
308
used in preference.
309

  
310
If the list has multiple entries, they will be tried in order until
311
one gives a successful answer.
312

  
313
Dry-run allocation
314
^^^^^^^^^^^^^^^^^^
315

  
316
The create instance LU will get a new 'dry-run' option that will just
317
simulate the placement, and return the chosen node-lists after running
318
all the usual checks.
319

  
320
Cluster balancing
321
^^^^^^^^^^^^^^^^^
322

  
323
Instance add/removals/moves can create a situation where load on the
324
nodes is not spread equally. For this, a new iallocator mode will be
325
implemented called ``balance`` in which the plugin, given the current
326
cluster state, and a maximum number of operations, will need to
327
compute the instance relocations needed in order to achieve a "better"
328
(for whatever the script believes it's better) cluster.
329

  
330
Cluster capacity calculation
331
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
332

  
333
In this mode, called ``capacity``, given an instance specification and
334
the current cluster state (similar to the ``allocate`` mode), the
335
plugin needs to return:
336

  
337
- how many instances can be allocated on the cluster with that specification
338
- on which nodes these will be allocated (in order)

Also available in: Unified diff