"Fossies" - the Fresh Open Source Software Archive

Member "masakari-9.0.0/doc/source/configuration/recovery_workflow_custom_task.rst" (13 May 2020, 2506 Bytes) of package /linux/misc/openstack/masakari-9.0.0.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Guide for Custom Recovery Workflow Configuration

If operator wants customized recovery workflow, so here is guidelines mentioned for how to associate custom tasks from Third Party Library along with standard recovery workflows in Masakari.:

  1. First make sure required Third Party Library is installed on the Masakari engine node. Below is the sample custom task file. For example:
from oslo_log import log as logging
from taskflow import task

LOG = logging.getLogger(__name__)

class Noop(task.Task):

    def __init__(self, novaclient):
        self.novaclient = novaclient
        super(Noop, self).__init__()

    def execute(self, **kwargs):
        LOG.info("Custom task executed successfully..!!")
  1. Configure custom task in Third Party Library's setup.cfg as below:

For example, Third Party Library's setup.cfg will have following entry points

masakari.task_flow.tasks =
    custom_pre_task = <custom_task_class_path_from_third_party_library>
    custom_main_task = <custom_task_class_path_from_third_party_library>
    custom_post_task = <custom_task_class_path_from_third_party_library>

Note: Entry point in Third Party Library's setup.cfg should have same key as in Masakari setup.cfg for respective failure recovery.

  1. Configure custom task in Masakari's new conf file custom-recovery-methods.conf with same name which was given in the setup.cfg to locate class path. For example(custom task added in host auto failure config option):
host_auto_failure_recovery_tasks = {
'pre': ['disable_compute_service_task', 'custom_pre_task'],
'main': ['custom_main_task', 'prepare_HA_enabled_instances_task'],
'post': ['evacuate_instances_task', 'custom_post_task']}
  1. If there are any configuration parameters required for custom task, then add them into custom-recovery-methods.conf under the same group/section where they are registered in Third Party Library. All config parameters related to recovery method customization should be part of newly added conf file. Operator will be responsible to generate masakari.conf and related configuration files by themselves.
  2. Operator should ensure output of each task should be made available to the next tasks needing them.