4.7. Configuring Management Node High Availability

4.7.1. vinfra cluster ha create

Create a HA configuration:

usage: vinfra cluster ha create --virtual-ip <network:ip> --nodes <nodes> [--force]
--virtual-ip <network:ip>

HA configuration mapping in the format:

  • network: network to include in the HA configuration (must include at least one of these traffic types: Internal management, Admin panel, Self-service panel, or Compute API).
  • ip: virtual IP address that will be used in the HA configuration.

Specify this option multiple times to create a HA configuration for multiple networks.

--nodes <nodes>
A comma-separated list of node IDs or hostnames
--force
Skip checks for minimal hardware requirements

Example:

# vinfra cluster ha create --virtual-ip Private:10.37.130.200 \
--virtual-ip Public:10.94.129.79 --nodes 94d58604-6f30-4339-8578-adb7903b7277,\
f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4,7d7d37b8-4c06-4f1a-b3a6-4b54257d70ce
+---------+--------------------------------------+
| Field   | Value                                |
+---------+--------------------------------------+
| task_id | 80a00e55-335d-4d41-bac4-5fee4791d423 |
+---------+--------------------------------------+

This command creates a task to create a management node HA cluster from nodes with the IDs 94d58604-6f30-4339-8578-adb7903b7277, f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4, and 7d7d37b8-4c06-4f1a-b3a6-4b54257d70ce.

The command must specify the network with the traffic type Internal management as well as one with the traffic type Admin panel.

Important

After the HA cluster has been created, the admin panel will only be accessible at the provided public IP address. Log in to said address via SSH to continue managing Virtuozzo Infrastructure Platform with the vinfra CLI tool. You may also need to set the VINFRA_PASSWORD environment variable again, because you will access different HA cluster nodes on each log in where it may not have been set.

Task outcome:

# vinfra task show 80a00e55-335d-4d41-bac4-5fee4791d423
+---------+-------------------------------------------------------+
| Field   | Value                                                 |
+---------+-------------------------------------------------------+
| details |                                                       |
| name    | backend.presentation.ha.tasks.CreateHaConfigTask      |
| result  | compute_task_id: c5125024-5472-4420-b8b6-e03971ab952c |
|         | ha_cluster_location:                                  |
|         | - https://10.94.129.79:8888                           |
|         | nodes:                                                |
|         | - id: 94d58604-6f30-4339-8578-adb7903b7277            |
|         |   ipaddr: 10.37.130.118                               |
|         |   is_primary: false                                   |
|         | - id: f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4            |
|         |   ipaddr: 10.37.130.134                               |
|         |   is_primary: true                                    |
|         | - id: 7d7d37b8-4c06-4f1a-b3a6-4b54257d70ce            |
|         |   ipaddr: 10.37.130.246                               |
|         |   is_primary: false                                   |
|         | primary_node_location: https://10.94.62.243:8888      |
|         | virtual_ips:                                          |
|         | - ip: 10.94.129.79                                    |
|         |   roles_set: 5f0adc1d-c10f-46c1-b7b8-dd1aacab613b     |
|         | - ip: 10.37.130.200                                   |
|         |   roles_set: 5a0401b5-9b42-4d8b-8372-71c747230033     |
| state   | success                                               |
| task_id | 80a00e55-335d-4d41-bac4-5fee4791d423                  |
+---------+-------------------------------------------------------+

4.7.2. vinfra cluster ha update

Update the HA configuration:

usage: vinfra cluster ha update [--virtual-ip <network:ip>]
                                [--nodes <nodes>] [--force]
--virtual-ip <network:ip>

HA configuration mapping in the format:

  • network: network to include in the HA configuration (must include at least one of these traffic types: Internal management, Admin panel, Self-service panel, or Compute API).
  • ip: virtual IP address that will be used in the HA configuration.

Specify this option multiple times to create an HA configuration for multiple networks.

--nodes <nodes>
A comma-separated list of node IDs or hostnames
--force
Skip checks for minimal hardware requirements

Example:

# vinfra cluster ha update --nodes 94d58604-6f30-4339-8578-adb7903b7277,\
f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4,4b83a87d-9adf-472c-91f0-782c47b2d5f1
+---------+--------------------------------------+
| Field   | Value                                |
+---------+--------------------------------------+
| task_id | 565e9146-254b-4f7a-a2ff-b7119c95baa9 |
+---------+--------------------------------------+

This command creates a task to update the management node HA configuration, that is, include the nodes with the IDs 94d58604-6f30-4339-8578-adb7903b7277, f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4, and 4b83a87d-9adf-472c-91f0-782c47b2d5f1.

Task outcome:

# vinfra task show 565e9146-254b-4f7a-a2ff-b7119c95baa9
+---------+-------------------------------------------------------+
| Field   | Value                                                 |
+---------+-------------------------------------------------------+
| details |                                                       |
| name    | backend.presentation.ha.tasks.UpdateHaConfigTask      |
| result  | compute_task_id: 84994caf-3a02-43ea-b904-48632f0379c7 |
|         | ha_cluster_location:                                  |
|         | - https://10.94.129.79:8888                           |
|         | nodes:                                                |
|         | - id: f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4            |
|         |   ipaddr: 10.37.130.134                               |
|         |   is_primary: true                                    |
|         | - id: 4b83a87d-9adf-472c-91f0-782c47b2d5f1            |
|         |   ipaddr: 10.37.130.127                               |
|         |   is_primary: false                                   |
|         | - id: 94d58604-6f30-4339-8578-adb7903b7277            |
|         |   ipaddr: 10.37.130.118                               |
|         |   is_primary: false                                   |
|         | primary_node_location: https://10.94.62.243:8888      |
|         | virtual_ips:                                          |
|         | - ip: 10.94.129.79                                    |
|         |   roles_set: 5f0adc1d-c10f-46c1-b7b8-dd1aacab613b     |
|         | - ip: 10.37.130.200                                   |
|         |   roles_set: 5a0401b5-9b42-4d8b-8372-71c747230033     |
| state   | success                                               |
| task_id | 565e9146-254b-4f7a-a2ff-b7119c95baa9                  |
+---------+-------------------------------------------------------+

4.7.3. vinfra cluster ha show

Display the HA configuration:

usage: vinfra cluster ha show

Example:

# vinfra cluster ha show
+-----------------------+---------------------------------------------------+
| Field                 | Value                                             |
+-----------------------+---------------------------------------------------+
| ha_cluster_location   | - https://10.94.129.79:8888                       |
| nodes                 | - id: 94d58604-6f30-4339-8578-adb7903b7277        |
|                       |   ipaddr: 10.37.130.118                           |
|                       |   is_primary: false                               |
|                       | - id: f59dabdb-bd1c-4944-8af2-26b8fe9ff8d4        |
|                       |   ipaddr: 10.37.130.134                           |
|                       |   is_primary: true                                |
|                       | - id: 4b83a87d-9adf-472c-91f0-782c47b2d5f1        |
|                       |   ipaddr: 10.37.130.127                           |
|                       |   is_primary: false                               |
| primary_node_location | https://10.94.62.243:8888                         |
| virtual_ips           | - ip: 10.37.130.200                               |
|                       |   roles_set: 5a0401b5-9b42-4d8b-8372-71c747230033 |
|                       | - ip: 10.94.129.79                                |
|                       |   roles_set: 5f0adc1d-c10f-46c1-b7b8-dd1aacab613b |
+-----------------------+---------------------------------------------------+

This command shows the management node HA cluster configuration.

4.7.4. vinfra cluster ha delete

Delete the HA configuration:

usage: vinfra cluster ha delete

Example:

# vinfra cluster ha delete
+---------+--------------------------------------+
| Field   | Value                                |
+---------+--------------------------------------+
| task_id | c1f3e9c3-0a7b-455a-96d4-cef3b7e86e62 |
+---------+--------------------------------------+

This command creates a task to delete the management node HA cluster.

Task outcome:

# vinfra task show c1f3e9c3-0a7b-455a-96d4-cef3b7e86e62
+---------+--------------------------------------------------+
| Field   | Value                                            |
+---------+--------------------------------------------------+
| details |                                                  |
| name    | backend.presentation.ha.tasks.DeleteHaConfigTask |
| result  |                                                  |
| state   | success                                          |
| task_id | c1f3e9c3-0a7b-455a-96d4-cef3b7e86e62             |
+---------+--------------------------------------------------+