Revision 0ce212e5
b/lib/cli.py | ||
---|---|---|
194 | 194 |
"DISK_STATE_OPT", |
195 | 195 |
"HV_STATE_OPT", |
196 | 196 |
"IGNORE_IPOLICY_OPT", |
197 |
"INSTANCE_POLICY_OPTS", |
|
197 | 198 |
# Generic functions for CLI programs |
198 | 199 |
"ConfirmOperation", |
199 | 200 |
"GenericMain", |
... | ... | |
1388 | 1389 |
PRIORITY_OPT, |
1389 | 1390 |
] |
1390 | 1391 |
|
1392 |
# common instance policy options |
|
1393 |
INSTANCE_POLICY_OPTS = [ |
|
1394 |
SPECS_CPU_COUNT_OPT, |
|
1395 |
SPECS_DISK_COUNT_OPT, |
|
1396 |
SPECS_DISK_SIZE_OPT, |
|
1397 |
SPECS_MEM_SIZE_OPT, |
|
1398 |
SPECS_NIC_COUNT_OPT, |
|
1399 |
SPECS_DISK_TEMPLATES, |
|
1400 |
] |
|
1401 |
|
|
1391 | 1402 |
|
1392 | 1403 |
def _ParseArgs(argv, commands, aliases, env_override): |
1393 | 1404 |
"""Parser for the command line arguments. |
b/lib/client/gnt_cluster.py | ||
---|---|---|
1444 | 1444 |
else: |
1445 | 1445 |
return _EpoOff(opts, node_list, inst_map) |
1446 | 1446 |
|
1447 |
INSTANCE_POLICY_OPTS = [ |
|
1448 |
SPECS_CPU_COUNT_OPT, |
|
1449 |
SPECS_DISK_COUNT_OPT, |
|
1450 |
SPECS_DISK_SIZE_OPT, |
|
1451 |
SPECS_MEM_SIZE_OPT, |
|
1452 |
SPECS_NIC_COUNT_OPT, |
|
1453 |
] |
|
1454 |
|
|
1455 | 1447 |
commands = { |
1456 | 1448 |
"init": ( |
1457 | 1449 |
InitCluster, [ArgHost(min=1, max=1)], |
b/lib/client/gnt_group.py | ||
---|---|---|
277 | 277 |
|
278 | 278 |
return rcode |
279 | 279 |
|
280 |
INSTANCE_POLICY_OPTS = [ |
|
281 |
SPECS_CPU_COUNT_OPT, |
|
282 |
SPECS_DISK_COUNT_OPT, |
|
283 |
SPECS_DISK_SIZE_OPT, |
|
284 |
SPECS_MEM_SIZE_OPT, |
|
285 |
SPECS_NIC_COUNT_OPT, |
|
286 |
] |
|
287 |
|
|
288 | 280 |
commands = { |
289 | 281 |
"add": ( |
290 | 282 |
AddGroup, ARGS_ONE_GROUP, |
b/man/gnt-cluster.rst | ||
---|---|---|
190 | 190 |
| [--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]] |
191 | 191 |
| [--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]] |
192 | 192 |
| [--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]] |
193 |
| [--specs-disk-templates *template* [,*template*...]] |
|
193 | 194 |
| [--disk-state *diskstate*] |
194 | 195 |
| [--hypervisor-state *hvstate*] |
195 | 196 |
| {*clustername*} |
... | ... | |
371 | 372 |
list of key-value pairs. These parameters can only be specified at |
372 | 373 |
cluster and node group level; the cluster-level parameter are inherited |
373 | 374 |
by the node group at the moment of its creation, and can be further |
374 |
modified at node group level using the **gnt-group**(8) command.
|
|
375 |
modified at node group level using the **gnt-group**(8) command. |
|
375 | 376 |
|
376 | 377 |
The following is the list of disk parameters available for the **drbd** |
377 | 378 |
template, with measurement units specified in square brackets at the end |
... | ... | |
483 | 484 |
that the master will try to keep as master\_candidates. For more |
484 | 485 |
details about this role and other node roles, see the ganeti(7). |
485 | 486 |
|
486 |
The ``--specs-..`` options specify instance policy on the cluster. Each |
|
487 |
option can have three values: ``min``, ``max`` and ``std``, which can |
|
488 |
also be modified on group level (except for ``std``, which is defined |
|
489 |
once for the entire cluster). Please note, that ``std`` values are not |
|
490 |
the same as defaults set by ``--beparams``. |
|
491 |
``--specs-cpu-count`` sets the number of VCPUs that can be used by an |
|
492 |
instance. |
|
493 |
``--specs-disk-count`` sets the number of disks |
|
494 |
``--specs-disk-size`` limits the disk size for every disk used |
|
495 |
``--specs-mem-size`` limits the amount of memory available |
|
496 |
``--specs-nic-count`` sets limits on the amount of nics used |
|
487 |
The ``--specs-...`` options specify instance policy on the |
|
488 |
cluster. Except for the ``disk-templates`` option, each option can have |
|
489 |
three values: ``min``, ``max`` and ``std``, which can also be modified |
|
490 |
on group level (except for ``std``, which is defined once for the entire |
|
491 |
cluster). Please note, that ``std`` values are not the same as defaults |
|
492 |
set by ``--beparams``, but they are used for the capacity calculations. |
|
493 |
|
|
494 |
- ``--specs-cpu-count`` limits the number of VCPUs that can be used by an |
|
495 |
instance. |
|
496 |
- ``--specs-disk-count`` limits the number of disks |
|
497 |
- ``--specs-disk-size`` limits the disk size for every disk used |
|
498 |
- ``--specs-mem-size`` limits the amount of memory available |
|
499 |
- ``--specs-nic-count`` sets limits on the number of NICs used |
|
500 |
- ``--specs-disk-templates`` limits the allowed disk templates (no |
|
501 |
mix/std/max for this option) |
|
497 | 502 |
|
498 | 503 |
For details about how to use ``--hypervisor-state`` and ``--disk-state`` |
499 | 504 |
have a look at **ganeti**(7). |
... | ... | |
565 | 570 |
| [--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]] |
566 | 571 |
| [--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]] |
567 | 572 |
| [--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]] |
573 |
| [--specs-disk-templates *template* [,*template*...]] |
|
568 | 574 |
|
569 | 575 |
|
570 | 576 |
Modify the options for the cluster. |
... | ... | |
601 | 607 |
command. To clear the default iallocator, just pass an empty string |
602 | 608 |
(''). |
603 | 609 |
|
604 |
The ``--specs-..`` options are described in the **init** command. |
|
610 |
The ``--specs-...`` options are described in the **init** command.
|
|
605 | 611 |
|
606 | 612 |
QUEUE |
607 | 613 |
~~~~~ |
b/man/gnt-group.rst | ||
---|---|---|
32 | 32 |
| [--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]] |
33 | 33 |
| [--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]] |
34 | 34 |
| [--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]] |
35 |
| [--specs-disk-templates *template* [,*template*...]] |
|
35 | 36 |
| [--disk-state *diskstate*] |
36 | 37 |
| [--hypervisor-state *hvstate*] |
37 | 38 |
| {*group*} |
... | ... | |
66 | 67 |
**gnt-cluster add** in **gnt-cluster**(8) for more information about |
67 | 68 |
disk parameters |
68 | 69 |
|
69 |
The ``--specs-..`` options specify instance policy on the cluster. Each |
|
70 |
option can have two values: ``min`` and ``max``. |
|
71 |
``--specs-cpu-count`` sets the number of VCPUs that can be used by an |
|
72 |
instance. |
|
73 |
``--specs-disk-count`` sets the number of disks |
|
74 |
``--specs-disk-size`` limits the disk size for every disk used |
|
75 |
``--specs-mem-size`` limits the amount of memory available |
|
76 |
``--specs-nic-count`` sets limits on the amount of nics used |
|
70 |
The ``--specs-...`` options specify instance policies on the node group, |
|
71 |
and are documented in the **gnt-cluster**(8) man page. |
|
77 | 72 |
|
78 | 73 |
ASSIGN-NODES |
79 | 74 |
~~~~~~~~~~~~ |
... | ... | |
105 | 100 |
| [--specs-disk-size *spec-param*=*value* [,*spec-param*=*value*...]] |
106 | 101 |
| [--specs-mem-size *spec-param*=*value* [,*spec-param*=*value*...]] |
107 | 102 |
| [--specs-nic-count *spec-param*=*value* [,*spec-param*=*value*...]] |
103 |
| [--specs-disk-templates *template* [,*template*...]] |
|
108 | 104 |
| {*group*} |
109 | 105 |
|
110 | 106 |
Modifies some parameters from the node group. |
... | ... | |
114 | 110 |
``--disk-state`` are documented in detail in **ganeti**(7). |
115 | 111 |
|
116 | 112 |
The ``--node-parameters``, ``--alloc-policy``, ``-D |
117 |
(--disk-parameters)`` and ``--specs-..`` options are documented in the |
|
118 |
**add** command above. |
|
113 |
(--disk-parameters)`` options are documented in the **add** command |
|
114 |
above. |
|
115 |
|
|
116 |
The ``--specs-...`` options specify instance policies on the node group, |
|
117 |
and are documented in the **gnt-cluster**(8) man page. |
|
119 | 118 |
|
120 | 119 |
REMOVE |
121 | 120 |
~~~~~~ |
Also available in: Unified diff