Configuring automatic evacuation for the case of different instance evacuation priorities

  1. Open configuration file cloud_manager.conf and adjust settings:

    Section [host_tasks]:

    • allow_evacuate_host = True (parameter allows (or disables) host evacuation, default value is True)
    • evacuation_retries = 2 (parameter defines the number of attempts to evacuate instances from the compute node, the default value is 2)

    Note

    You also need to make sure that the values of the deny_evacuate parameter do not specify nodes for which evacuation is prohibited. The nodes specified in this parameter will not be automatically evacuated.

    Section [node_tracker]:

    • enabled = True (parameter allows checking the status of compute nodes, default value is True)
    • max_down_hosts = 1, 2, 3... (≥ 1) (the parameter defines the maximum allowed number of computing nodes in the down status, except for backup ones. If this number is exceeded, automatic evacuation is not performed for any of the nodes. Negative numbers are not allowed. By default, the parameter is set to 0, automatic evacuation is not performed)
    • mutex = 3 (the parameter determines the number of attempts to determine the status of the hypervisor when switching to the down status before starting the handler, by default the parameter has a value of 3)
    • loop_time = 30 (the parameter defines the time interval between checks of the status of computing nodes in seconds, the default value is 30)
  2. Restart the CloudManager module services for changes made to the configuration file to take effect:

    sudo i - superuser mode
    systemctl restart aos-cloud-manager-*
    
  3. Create instance in the Dashboard, specifying the “Recovery Priority” parameter, where:

    0 - instance will not be evacuated to another node in case of problems on the current;

    10 - instance will be evacuated first.

    It is also necessary to specify the “Evacuation time (in seconds)” parameter, which determines the delay time before proceeding to the next auto evacuation of a group of vehicles with the same priority. The default is 60 sec.

    If vehicles with the same priorities have different evacuation times, choose the longest time as the delay:

    ../../_images/recovery_priority.png

    Parameters that determine the priority and order of evacuation of instances

As a result of the actions taken, when auto evacuation is started, instances will be evacuated depending on the set priority from 0-10 and the selected evacuation time.