def test_all_partition():
    hosts = shakedown.get_service_ips(config.SERVICE_NAME)
    for host in hosts:
        shakedown.partition_agent(host)
    for host in hosts:
        shakedown.reconnect_agent(host)
    config.check_running()
示例#2
0
def test_partition(install_framework):
    host = get_node_host()

    shakedown.partition_agent(host)
    shakedown.reconnect_agent(host)

    check_health()
示例#3
0
def test_partition():
    host = get_node_host()

    shakedown.partition_agent(host)
    shakedown.reconnect_agent(host)

    check_health()
def test_partition(install_framework):
    host = get_node_host()

    shakedown.partition_agent(host)
    shakedown.reconnect_agent(host)

    check_health()
def test_all_partition():
    hosts = shakedown.get_service_ips(PACKAGE_NAME)

    for host in hosts:
        shakedown.partition_agent(host)
    for host in hosts:
        shakedown.reconnect_agent(host)

    check_health()
def test_all_partition():
    hosts = shakedown.get_service_ips(PACKAGE_NAME)

    for host in hosts:
        shakedown.partition_agent(host)
    for host in hosts:
        shakedown.reconnect_agent(host)

    check_health()
def test_partition():
    host = get_node_host()

    shakedown.partition_agent(host)
    time.sleep(20)
    shakedown.reconnect_agent(host)
    recover_host_from_partitioning(host)

    check_health()
def test_all_partition():
    hosts = shakedown.get_service_ips(PACKAGE_NAME)

    for host in hosts:
        shakedown.partition_agent(host)
    time.sleep(20)
    for host in hosts:
        shakedown.reconnect_agent(host)
    for host in hosts:
        recover_host_from_partitioning(host)

    check_health()
def test_config_update_while_partitioned():
    world_ids = sdk_tasks.get_task_ids(config.SERVICE_NAME, 'world')
    host = sdk_hosts.system_host(config.SERVICE_NAME, "world-0-server")
    shakedown.partition_agent(host)

    service_config = sdk_marathon.get_config(config.SERVICE_NAME)
    updated_cpus = float(service_config['env']['WORLD_CPUS']) + 0.1
    service_config['env']['WORLD_CPUS'] = str(updated_cpus)
    sdk_marathon.update_app(config.SERVICE_NAME, service_config, wait_for_completed_deployment=False)

    shakedown.reconnect_agent(host)
    sdk_tasks.check_tasks_updated(config.SERVICE_NAME, 'world', world_ids)
    config.check_running()
    all_tasks = shakedown.get_service_tasks(config.SERVICE_NAME)
    running_tasks = [t for t in all_tasks if t['name'].startswith('world') and t['state'] == "TASK_RUNNING"]
    assert len(running_tasks) == config.world_task_count(config.SERVICE_NAME)
    for t in running_tasks:
        assert config.close_enough(t['resources']['cpus'], updated_cpus)
示例#10
0
def test_config_update_while_partitioned():
    world_ids = sdk_tasks.get_task_ids(config.SERVICE_NAME, 'world')
    host = sdk_hosts.system_host(config.SERVICE_NAME, "world-0-server")
    shakedown.partition_agent(host)

    service_config = sdk_marathon.get_config(config.SERVICE_NAME)
    updated_cpus = float(service_config['env']['WORLD_CPUS']) + 0.1
    service_config['env']['WORLD_CPUS'] = str(updated_cpus)
    sdk_marathon.update_app(config.SERVICE_NAME, service_config, wait_for_completed_deployment=False)

    shakedown.reconnect_agent(host)
    sdk_tasks.check_tasks_updated(config.SERVICE_NAME, 'world', world_ids)
    config.check_running()
    all_tasks = shakedown.get_service_tasks(config.SERVICE_NAME)
    running_tasks = [t for t in all_tasks if t['name'].startswith('world') and t['state'] == "TASK_RUNNING"]
    assert len(running_tasks) == config.world_task_count(config.SERVICE_NAME)
    for t in running_tasks:
        assert config.close_enough(t['resources']['cpus'], updated_cpus)
示例#11
0
 def partition():
     shakedown.partition_agent(host)
     shakedown.reconnect_agent(host)
示例#12
0
 def partition():
     for host in hosts:
         shakedown.partition_agent(host)
     for host in hosts:
         shakedown.reconnect_agent(host)
 def partition():
     shakedown.partition_agent(host)
     time.sleep(20)
     shakedown.reconnect_agent(host)
 def partition():
     for host in hosts:
         shakedown.partition_agent(host)
     for host in hosts:
         shakedown.reconnect_agent(host)
 def partition():
     shakedown.partition_agent(host)
     shakedown.reconnect_agent(host)
 def partition():
     for host in hosts:
         shakedown.partition_agent(host)
     time.sleep(20)
     for host in hosts:
         shakedown.reconnect_agent(host)
def test_partition():
    host = sdk_hosts.system_host(config.SERVICE_NAME, "hello-0-server")
    shakedown.partition_agent(host)
    shakedown.reconnect_agent(host)
    config.check_running()