3.4. Managing compute nodes

3.4.1. vinfra service compute node add

Add a node to the compute cluster:

usage: vinfra service compute node add [--compute] [--controller] [--force] <node>
--compute
Compute node role
--controller
Compute controller node role
--force
Skip checks for minimal hardware requirements
<node>
Node ID or hostname

Example:

# vinfra service compute node add 827a1f4e-56e5-404f-9113-88748c18f0c2 --compute
+---------+--------------------------------------+
| Field   | Value                                |
+---------+--------------------------------------+
| task_id | 4c58e63c-31b6-406a-8070-9197445ec794 |
+---------+--------------------------------------+

This command creates a task to add the node with the ID 827a1f4e-56e5-404f-9113-88748c18f0c2 to the compute cluster with the compute role.

Task outcome:

# vinfra task show 4c58e63c-31b6-406a-8070-9197445ec794
+---------+--------------------------------------------------------+
| Field   | Value                                                  |
+---------+--------------------------------------------------------+
| details |                                                        |
| name    | backend.presentation.compute.tasks.AddComputeNodesTask |
| result  |                                                        |
| state   | success                                                |
| task_id | 4c58e63c-31b6-406a-8070-9197445ec794                   |
+---------+--------------------------------------------------------+

3.4.2. vinfra service compute node list

List compute nodes:

usage: vinfra service compute node list [--long]
--long
Enable access and listing of all fields of objects.

Example:

# vinfra service compute node list
+--------------------------------------+------------------------+-------+-----+
| id                                   | host                   | state | vms |
+--------------------------------------+------------------------+-------+-----+
| 7ffa9540-5a20-41d1-b203-e3f349d62565 | node001.vstoragedomain | up    |   1 |
| 6e8afc28-7f71-4848-bdbe-7c5de64c5013 | node002.vstoragedomain | up    |   1 |
| 02ff64ae-5800-4090-b958-18b1fe8f5060 | node003.vstoragedomain | up    |   1 |
| 827a1f4e-56e5-404f-9113-88748c18f0c2 | node004.vstoragedomain | up    |   0 |
| 37c70bfb-c289-4794-8be4-b7a40c2b6d95 | node005.vstoragedomain | up    |   1 |
+--------------------------------------+------------------------+-------+-----+

This command lists nodes in the compute cluster.

3.4.3. vinfra service compute node show

Display compute node details:

usage: vinfra service compute node show <node>
<node>
Node ID or hostname

Example:

# vinfra service compute node show 7ffa9540-5a20-41d1-b203-e3f349d62565
+---------------+------------------------------------------+
| Field         | Value                                    |
+---------------+------------------------------------------+
| host          | node001.vstoragedomain                   |
| host_ip       | 10.37.130.101                            |
| hypervisor    | id: 86f1ca2c-71c7-47a0-9c7f-bb9dd705e67e |
|               | state: up                                |
|               | status: enabled                          |
|               | vms: 0                                   |
| id            | 7ffa9540-5a20-41d1-b203-e3f349d62565     |
| orig_hostname | node001                                  |
| placements    | []                                       |
| roles         | - controller                             |
|               | - compute                                |
| services      | - name: cinder-scheduler                 |
|               |   state: healthy                         |
|               | - name: cinder-volume                    |
|               |   state: healthy                         |
|               | - name: neutron-dhcp-agent               |
|               |   state: healthy                         |
|               | - name: neutron-l3-agent                 |
|               |   state: healthy                         |
|               | - name: neutron-metadata-agent           |
|               |   state: healthy                         |
|               | - name: neutron-openvswitch-agent        |
|               |   state: healthy                         |
|               | - name: nova-compute                     |
|               |   state: healthy                         |
|               | - name: nova-conductor                   |
|               |   state: healthy                         |
|               | - name: nova-scheduler                   |
|               |   state: healthy                         |
| state         | healthy                                  |
+---------------+------------------------------------------+

This command shows the details of the compute node with the ID 7ffa9540-5a20-41d1-b203-e3f349d62565.

3.4.4. vinfra service compute node fence

Fence a compute node:

usage: vinfra service compute node fence <node>
<node>
Node ID or hostname

Example:

# vinfra service compute node fence e6255aed-d6e7-41b2-ba90-86164c1cd9a6
Operation successful

This command fences the node with the ID e6255aed-d6e7-41b2-ba90-86164c1cd9a6.

3.4.5. vinfra service compute node unfence

Unfence a compute node:

usage: vinfra service compute node unfence <node>
<node>
Node ID or hostname

Example:

# vinfra service compute node unfence e6255aed-d6e7-41b2-ba90-86164c1cd9a6
Operation successful

This command unfences the node with the ID e6255aed-d6e7-41b2-ba90-86164c1cd9a6.

3.4.6. vinfra service compute node release

Release a node from the compute cluster:

usage: vinfra service compute node release [--compute] [--controller] <node>
--compute
Compute node role
--controller
Compute controller node role
<node>
Node ID or hostname

Example:

# vinfra service compute node release 827a1f4e-56e5-404f-9113-88748c18f0c2
+---------+--------------------------------------+
| Field   | Value                                |
+---------+--------------------------------------+
| task_id | 3b39738c-80a6-40a6-a50d-c3c8118ed212 |
+---------+--------------------------------------+

This command creates a task to release the node with the ID 827a1f4e-56e5-404f-9113-88748c18f0c2 from the compute cluster.

Task outcome:

# vinfra task show 3b39738c-80a6-40a6-a50d-c3c8118ed212
+---------+-----------------------------------------------------------+
| Field   | Value                                                     |
+---------+-----------------------------------------------------------+
| details |                                                           |
| name    | backend.presentation.compute.tasks.DeleteComputeNodesTask |
| result  |                                                           |
| state   | success                                                   |
| task_id | 3b39738c-80a6-40a6-a50d-c3c8118ed212                      |
+---------+-----------------------------------------------------------+