def start_corosync_services(env):
    node = next(env_util.get_controllers(env))
    status_out, _ = ssh.call(['crm', 'resource', 'list'],
                             stdout=ssh.PIPE,
                             node=node)
    for service in maintenance.parse_crm_status(status_out):
        while True:
            try:
                ssh.call(['crm', 'resource', 'start', service], node=node)
            except subprocess.CalledProcessError:
                pass
            else:
                break
def start_corosync_services(env):
    node = next(env_util.get_controllers(env))
    status_out, _ = ssh.call(['crm', 'resource', 'list'],
                             stdout=ssh.PIPE,
                             node=node)
    for service in maintenance.parse_crm_status(status_out):
        while True:
            try:
                ssh.call(['crm', 'resource', 'start', service],
                         node=node)
            except subprocess.CalledProcessError:
                pass
            else:
                break
Exemple #3
0
def test_parse_crm_status():
    res = list(maintenance.parse_crm_status(CRM_STATUS_SAMPLE))
    assert res == CRM_STATUS_PARSE_RESULT
def test_parse_crm_status():
    res = list(maintenance.parse_crm_status(CRM_STATUS_SAMPLE))
    assert res == CRM_STATUS_PARSE_RESULT