<commit_before>gnt-group(8) Ganeti | Version @GANETI_VERSION@
==============================================

Name
----

gnt-group - Ganeti node-group administration

Synopsis
--------

**gnt-group** {command} [arguments...]

DESCRIPTION
-----------

The **gnt-group** command is used for node group administration in
the Ganeti system.

COMMANDS
--------

ADD
~~~

| **add**
| [--node-parameters=*NDPARAMS*]
| [--alloc-policy=*POLICY*]
| {*group*}

Creates a new group with the given name. The node group will be
initially empty; to add nodes to it, use ``gnt-group assign-nodes``.

The ``--node-parameters`` option allows you to set default node
parameters for nodes in the group. Please see **ganeti**(7) for more
information about supported key=value pairs.

The ``--alloc-policy`` option allows you to set an allocation policy for
the group at creation time. Possible values are:

unallocable
    nodes in the group should not be candidates for instance allocation,
    and the operation (e.g., instance creation) should fail if only
    groups in this state could be found to satisfy the requirements.

last_resort
    nodes in the group should not be used for instance allocations,
    unless this would be the only way to have the operation succeed.

preferred
    nodes in the group can be used freely for allocation of instances
    (this is the default). Note that prioritization among groups in this
    state will be deferred to the iallocator plugin that's being used.

ASSIGN-NODES
~~~~~~~~~~~~

| **assign-nodes**
| [--force]
| {*group*} {*node*...}

Assigns one or more nodes to the specified group, moving them from their
original group (or groups).

By default, this command will refuse to proceed if the move would split
between groups any instance that was not previously split (a split
instance is an instance with a mirrored disk template, e.g. DRBD, that
has the primary and secondary nodes in different node groups). You can
force the operation with ``--force``.

MODIFY
~~~~~~

| **modify**
| [--node-parameters=*NDPARAMS*]
| [--alloc-policy=*POLICY*]
| {*group*}

Modifies some parameters from the node group.

The ``--node-parameters`` and ``--alloc-policy`` optiosn are documented
in the **add** command above.

REMOVE
~~~~~~

| **remove** {*group*}

Deletes the indicated node group, which must be empty.

LIST
~~~~

| **list** [--no-headers] [--separator=*SEPARATOR*]
| [-o *[+]FIELD,...*] [group...]

Lists all existing node groups in the cluster.

The ``--no-headers`` option will skip the initial header line. The
``--separator`` option takes an argument which denotes what will be
used between the output fields. Both these options are to help
scripting.

The ``-o`` option takes a comma-separated list of output fields.
If the value of the option starts with the character ``+``, the new
fields will be added to the default list. This allows to quickly
see the default list plus a few other fields, instead of retyping
the entire list of fields.

The available fields and their meaning are:

name<commit_msg>manpage: gnt-group remove cannot remove last group<commit_after>gnt-group(8) Ganeti | Version @GANETI_VERSION@
==============================================

Name
----

gnt-group - Ganeti node-group administration

Synopsis
--------

**gnt-group** {command} [arguments...]

DESCRIPTION
-----------

The **gnt-group** command is used for node group administration in
the Ganeti system.

COMMANDS
--------

ADD
~~~

| **add**
| [--node-parameters=*NDPARAMS*]
| [--alloc-policy=*POLICY*]
| {*group*}

Creates a new group with the given name. The node group will be
initially empty; to add nodes to it, use ``gnt-group assign-nodes``.

The ``--node-parameters`` option allows you to set default node
parameters for nodes in the group. Please see **ganeti**(7) for more
information about supported key=value pairs.

The ``--alloc-policy`` option allows you to set an allocation policy for
the group at creation time. Possible values are:

unallocable
    nodes in the group should not be candidates for instance allocation,
    and the operation (e.g., instance creation) should fail if only
    groups in this state could be found to satisfy the requirements.

last_resort
    nodes in the group should not be used for instance allocations,
    unless this would be the only way to have the operation succeed.

preferred
    nodes in the group can be used freely for allocation of instances
    (this is the default). Note that prioritization among groups in this
    state will be deferred to the iallocator plugin that's being used.

ASSIGN-NODES
~~~~~~~~~~~~

| **assign-nodes**
| [--force]
| {*group*} {*node*...}

Assigns one or more nodes to the specified group, moving them from their
original group (or groups).

By default, this command will refuse to proceed if the move would split
between groups any instance that was not previously split (a split
instance is an instance with a mirrored disk template, e.g. DRBD, that
has the primary and secondary nodes in different node groups). You can
force the operation with ``--force``.

MODIFY
~~~~~~

| **modify**
| [--node-parameters=*NDPARAMS*]
| [--alloc-policy=*POLICY*]
| {*group*}

Modifies some parameters from the node group.

The ``--node-parameters`` and ``--alloc-policy`` optiosn are documented
in the **add** command above.

REMOVE
~~~~~~

| **remove** {*group*}

Deletes the indicated node group, which must be empty. There must always be at
least one group, so the last group cannot be removed.

LIST
~~~~

| **list** [--no-headers] [--separator=*SEPARATOR*]
| [-o *[+]FIELD,...*] [group...]

Lists all existing node groups in the cluster.

The ``--no-headers`` option will skip the initial header line. The
``--separator`` option takes an argument which denotes what will be
used between the output fields. Both these options are to help
scripting.

The ``-o`` option takes a comma-separated list of output fields.
If the value of the option starts with the character ``+``, the new
fields will be added to the default list. This allows to quickly
see the default list plus a few other fields, instead of retyping
the entire list of fields.

The available fields and their meaning are:

name
{'fraction_non_alphanumeric': 0.12510075769788812, 'fraction_numerical': 0.0006448492664839593, 'mean_word_length': 3.9004739336492893, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2834241', 'n_tokens_mistral': 1747, 'n_tokens_neox': 1703, 'n_words': 840}