Restoring management database with the compute cluster

If you have the compute cluster deployed, the management node database must be restored only on one of the compute nodes. After restoration, virtual machines that resided on the failed management node will be unmanageable in the admin panel and can only be deleted. However, you can rescue them by using the vinfra tool.

Limitations

  • If management node high availability is enabled, you cannot restore database backups by using the script. In this case, contact the technical support team.
  • If you create compute objects after the backup, they will be lost.
  • If you modify or delete compute objects after the backup, they will be restored as follows:
    • Compute objects used as configurations (flavors, storage policies, virtual networks, SSH keys) will be fully restored.
    • All other compute objects (virtual machines, volumes, images, etc.) will be partially restored. They will be shown in the admin panel but unusable. You will only be able to remove them from the admin panel.

Prerequisites

To restore the management database on a compute node

Run the restoration script with the -n option:

/usr/libexec/vstorage-ui-backend/bin/restore-management-node.sh -x <public_net_iface> -i <private_net_iface> \
-f /mnt/vstorage/webcp/backup/<backup_file> -n

where

  • The <public_net_iface> and <private_net_iface> are interfaces assigned the public and private networks.
  • The -f option specifies the path to the backup file. If omitted, the management node database will be restored from the latest backup.
  • The -n option denotes that the compute cluster will be reconfigured to use another management node. If you restore the management node database on the same node, omit the -n option.

For example, if the network interface eth0 is connected to the Public network, the network interface eth1 is connected to the Private network, and you want to restore the management node database with compute from the latest backup, run:

# /usr/libexec/vstorage-ui-backend/bin/restore-management-node.sh -x eth0 -i eth1 -n

To rescue virtual machines from the failed management node

  1. Check the VM state: VMs with enabled high availability will appear in the “Rebuild” state, while VMs with disabled high availability will appear in the “Active” state.
  2. If a VM in the “Rebuild” state, reset its state with the vinfra service compute server reset-state command.
  3. Evacuate all VMs by using the vinfra service compute server evacuate command.