Beispiel #1
0
def check_contrail_cores(nodes='all'):
    failure = False
    if nodes == 'all':
        nodes = get_all_hosts_in_cluster()
    for node in nodes:
        with settings(hide('everything'),
                      host_string=node,
                      key_filename=SSH_PUBKEY_FILE):
            crashes = sudo('ls /var/crashes/')
            if crashes:
                log.error('========== %s ===========\n%s' % (node, crashes))
                failure = True
    if failure:
        raise SetupIssue()
    log.info("No cores found in the cluster.")
Beispiel #2
0
def check_contrail_cores(nodes='all'):
    failure = False
    if nodes == 'all':
        nodes = get_all_hosts_in_cluster()
    for node in nodes:
        with settings(hide('everything'),
                      host_string=node,
                      key_filename=SSH_PUBKEY_FILE):
            crashes = sudo('ls /var/crashes/')
            if crashes:
                log.error('========== %s ===========\n%s' % (node, crashes))
                failure = True
    if failure:
        raise SetupIssue()
    log.info("No cores found in the cluster.")
Beispiel #3
0
def check_contrail_status(nodes='all'):
    failure = False
    if nodes == 'all':
        nodes = get_all_hosts_in_cluster()
    for node in nodes:
        with settings(hide('everything'),
                      host_string=node,
                      key_filename=SSH_PUBKEY_FILE):
            status = sudo('contrail-status')
            msg = '========== %s ===========\n%s' % (node, status)
            if any(fail_status in status for fail_status in FAIL_STATUS):
                log.error(msg)
                failure = True
            else:
                log.debug(msg)
    if failure:
        raise SetupIssue()
    log.info("All contrail services are running.")
def check_contrail_status(nodes='all'):
    failure = False
    if nodes == 'all':
        nodes = get_all_hosts_in_cluster()
    for node in nodes:
        with settings(hide('everything'),
                      host_string=node,
                      key_filename=SSH_PUBKEY_FILE):
            status = sudo('contrail-status')
            msg = '========== %s ===========\n%s' % (node, status)
            if any(fail_status in status for fail_status in FAIL_STATUS):
                log.error(msg)
                failure = True
            else:
                log.debug(msg)
    if failure:
        raise SetupIssue()
    log.info("All contrail services are running.")