Beispiel #1
0
def evacuate(name_config=None, debug=False, iteration=False):
    if debug:
        utils.configure_logging("DEBUG")

    try:
        iteration = int(iteration)
    except ValueError:
        LOG.error("Invalid value provided as 'iteration' argument, it must be "
                  "integer")
        return
    cfglib.collector_configs_plugins()
    cfglib.init_config(name_config)
    utils.init_singletones(cfglib.CONF)
    env.key_filename = cfglib.CONF.migrate.key_filename
    cloud = cloud_ferry.CloudFerry(cfglib.CONF)
    LOG.info("running evacuation")
    evacuation_chain.process_chain(cloud, iteration)

    freed_nodes = get_freed_nodes(iteration)

    if not freed_nodes:
        LOG.warning("Evacuation cannot be completed, because there are no "
                    "available compute nodes, that should be freed")
        return

    LOG.info(
        "Following nodes will be freed once in-cloud migration finishes, "
        "and can be moved from source to destination: %s", freed_nodes)
Beispiel #2
0
def migrate(name_config=None, name_instance=None):
    """
        :name_config - name of config yaml-file, example 'config.yaml'
    """
    cfglib.collector_configs_plugins()
    cfglib.init_config(name_config)
    utils.init_singletones(cfglib.CONF)
    env.key_filename = cfglib.CONF.migrate.key_filename
    cloud = cloud_ferry.CloudFerry(cfglib.CONF)
    cloud.migrate()
Beispiel #3
0
def migrate(name_config=None, name_instance=None, debug=False):
    """
        :name_config - name of config yaml-file, example 'config.yaml'
    """
    if debug:
        utl.configure_logging("DEBUG")
    cfglib.collector_configs_plugins()
    cfglib.init_config(name_config)
    utils.init_singletones(cfglib.CONF)
    env.key_filename = cfglib.CONF.migrate.key_filename
    cloud = cloud_ferry.CloudFerry(cfglib.CONF)
    cloud.migrate(Scenario())
Beispiel #4
0
def migrate(name_config=None, debug=None):
    """
        :name_config - name of config yaml-file, example 'config.yaml'
    """
    init(name_config, debug)
    env.key_filename = cfglib.CONF.migrate.key_filename
    env.connection_attempts = cfglib.CONF.migrate.ssh_connection_attempts
    env.cloud = cloud_ferry.CloudFerry(cfglib.CONF)
    status_error = env.cloud.migrate(
        Scenario(path_scenario=cfglib.CONF.migrate.scenario,
                 path_tasks=cfglib.CONF.migrate.tasks_mapping))
    sys.exit(status_error)
Beispiel #5
0
def migrate(name_config=None, name_instance=None, debug=False):
    """
        :name_config - name of config yaml-file, example 'config.yaml'
    """
    if debug:
        utils.configure_logging("DEBUG")
    cfglib.collector_configs_plugins()
    cfglib.init_config(name_config)
    utils.init_singletones(cfglib.CONF)
    env.key_filename = cfglib.CONF.migrate.key_filename
    env.connection_attempts = cfglib.CONF.migrate.ssh_connection_attempts
    cloud = cloud_ferry.CloudFerry(cfglib.CONF)
    cloud.migrate(
        Scenario(path_scenario=cfglib.CONF.migrate.scenario,
                 path_tasks=cfglib.CONF.migrate.tasks_mapping))