Example #1
0
def check_all_nodes(check_obj):
    if check_obj is 'all':
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor cls --all'
        else:
            check_cmd = 'sudo eayunstack doctor cls --all'
    else:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor cls -n %s' % check_obj
        else:
            check_cmd = 'sudo eayunstack doctor cls -n %s' % check_obj
    # get controller node list
    node_list = get_node_list('controller')
    # ssh to all controller node to check obj
    if len(node_list) == 0:
        LOG.warn('Node list is null !')
        return
    else:
        if check_obj == 'ceph':
            # only need to check one node for ceph cluster
            ceph_node = node_list[0]
            run_doctor_cmd_on_node('controller', ceph_node, check_cmd)
        else:
            proc_list = run_doctor_on_nodes('controller', node_list, check_cmd)
            for proc in proc_list:
                proc.join()
Example #2
0
def check_all_nodes(check_obj):
    if check_obj is 'all':
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor cls --all'
        else:
            check_cmd = 'sudo eayunstack doctor cls --all'
    else:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor cls -n %s' % check_obj
        else:
            check_cmd = 'sudo eayunstack doctor cls -n %s' % check_obj
    # get controller node list
    node_list = get_node_list('controller')
    # ssh to all controller node to check obj
    if len(node_list) == 0:
        LOG.warn('Node list is null !')
        return
    else:
        if check_obj == 'ceph':
            # only need to check one node for ceph cluster
            ceph_node = node_list[0]
            run_doctor_cmd_on_node('controller', ceph_node, check_cmd)
        else:
            (proc_list, pipe) = run_doctor_on_nodes('controller', node_list,
                                                    check_cmd)
            for proc in proc_list:
                proc.join()
            LOG.info(pipe.recv(), remote=True)
Example #3
0
def check_all_nodes(check_obj):
    if check_obj is 'all':
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor cls --all'
        else:
            check_cmd = 'sudo eayunstack doctor cls --all'
    else:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor cls -n %s' % check_obj
        else:
            check_cmd = 'sudo eayunstack doctor cls -n %s' % check_obj
    # get controller node list
    node_list = get_node_list('controller')
    # ssh to all controller node to check obj
    if len(node_list) == 0:
        LOG.warn('Node list is null !')
        return
    else:
        if check_obj == 'ceph':
            # only need to check one node for ceph cluster
            ceph_node = node_list[0]
            res = run_doctor_cmd_on_node('controller', ceph_node, check_cmd)
            LOG.info(res, remote=True)
        else:
            nodes = []
            for node in node_list:
                node_info = {}
                node_info['role'] = 'controller'
                node_info['name'] = node
                nodes.append(node_info)
            result = run_doctor_on_nodes(nodes, check_cmd)
            for res in result:
                LOG.info(res, remote=True)
Example #4
0
def check_all_nodes(check_obj):
    if check_obj is 'all':
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor cls --all'
        else:
            check_cmd = 'sudo eayunstack doctor cls --all'
    else:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor cls -n %s' % check_obj
        else:
            check_cmd = 'sudo eayunstack doctor cls -n %s' % check_obj
    # get controller node list
    node_list = get_node_list('controller')
    # ssh to all controller node to check obj
    if len(node_list) == 0:
        LOG.warn('Node list is null !')
        return
    else:
        if check_obj == 'ceph':
            # only need to check one node for ceph cluster
            ceph_node = node_list[0]
            run_doctor_cmd_on_node('controller', ceph_node, check_cmd)
        else:
            nodes = []
            for node in node_list:
                node_info = {}
                node_info['role'] = 'controller'
                node_info['name'] = node
                nodes.append(node_info)
            result = run_doctor_on_nodes(nodes, check_cmd)
            for res in result:
                LOG.info(res, remote=True)
Example #5
0
def check_nodes(obj_name):
   # node_list = get_node_list('all')
    check_cmd = get_check_cmd(obj_name)
    for role in ['controller','compute','mongo','ceph-osd']:
        node_list = get_node_list(role)
        proc_list = run_doctor_on_nodes(role, node_list, check_cmd)
    for proc in proc_list:
        proc.join()
Example #6
0
def check_nodes(obj_name):
    # node_list = get_node_list('all')
    check_cmd = get_check_cmd(obj_name)
    for role in ['controller', 'compute', 'mongo', 'ceph-osd']:
        node_list = get_node_list(role)
        (proc_list, pipe) = run_doctor_on_nodes(role, node_list, check_cmd)
    for proc in proc_list:
        proc.join()
    LOG.info(pipe.recv(), remote=True)
Example #7
0
def check_nodes(obj_name):
   # node_list = get_node_list('all')
    check_cmd = get_check_cmd(obj_name)
    for role in ['controller','compute','mongo','ceph-osd']:
        node_list = get_node_list(role)
        (proc_list, pipe) = run_doctor_on_nodes(role, node_list, check_cmd)
    for proc in proc_list:
        proc.join()
    LOG.info(pipe.recv(), remote=True)
Example #8
0
def check_all():
    '''Check All Environement Object'''
    if NODE_ROLE.is_fuel():
        check_cmd = get_check_cmd('all')
        for role in ['controller','compute','mongo','ceph-osd']:
            node_list = get_node_list(role)
            proc_list = run_doctor_on_nodes(role, node_list, check_cmd)
        for proc in proc_list:
            proc.join()
    else:
        for i in register.all:
            eval(i)()
Example #9
0
def check_all():
    '''Check All Environement Object'''
    if NODE_ROLE.is_fuel():
        check_cmd = get_check_cmd('all')
        for role in ['controller', 'compute', 'mongo', 'ceph-osd']:
            node_list = get_node_list(role)
            (proc_list, pipe) = run_doctor_on_nodes(role, node_list, check_cmd)
        for proc in proc_list:
            proc.join()
        LOG.info(pipe.recv(), remote=True)
    else:
        for i in register.all:
            eval(i)()
Example #10
0
def check_nodes(obj_name):
   # node_list = get_node_list('all')
    check_cmd = get_check_cmd(obj_name)
    nodes = []
    for role in ['controller','compute','mongo','ceph-osd']:
        node_list = get_node_list(role)
        for node in node_list:
            node_info = {}
            node_info['role'] = role
            node_info['name'] = node
            nodes.append(node_info)
    result = run_doctor_on_nodes(nodes, check_cmd)
    for res in result:
        LOG.info(res, remote=True)
Example #11
0
def check_nodes(obj_name):
    # node_list = get_node_list('all')
    check_cmd = get_check_cmd(obj_name)
    nodes = []
    for role in ['controller', 'compute', 'mongo', 'ceph-osd']:
        node_list = get_node_list(role)
        for node in node_list:
            node_info = {}
            node_info['role'] = role
            node_info['name'] = node
            nodes.append(node_info)
    result = run_doctor_on_nodes(nodes, check_cmd)
    for res in result:
        LOG.info(res, remote=True)
Example #12
0
def check_all():
    '''Check All Environement Object'''
    if NODE_ROLE.is_fuel():
        check_cmd = get_check_cmd('all')
        nodes = []
        for role in ['controller','compute','mongo','ceph-osd']:
            node_list = get_node_list(role)
            for node in node_list:
                node_info = {}
                node_info['role'] = role
                node_info['name'] = node
                nodes.append(node_info)
        result = run_doctor_on_nodes(nodes, check_cmd)
        for res in result:
            LOG.info(res, remote=True)
    else:
        for i in register.all:
            eval(i)()
Example #13
0
def check_nodes(node_role, check_obj, multi_role=False):
    if multi_role:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor stack --' + check_obj
        else:
            check_cmd = 'sudo eayunstack doctor stack --' + check_obj
    else:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor stack --' + check_obj + ' --%s' % node_role
        else:
            check_cmd = 'sudo eayunstack doctor stack --' + check_obj + ' --%s' % node_role
    node_list = get_node_list(node_role)
    if len(node_list) == 0:
        LOG.warn('Node list is null !')
        return
    proc_list = run_doctor_on_nodes(node_role, node_list, check_cmd)
    for proc in proc_list:
        proc.join()
Example #14
0
def check_all():
    '''Check All Environement Object'''
    if NODE_ROLE.is_fuel():
        check_cmd = get_check_cmd('all')
        nodes = []
        for role in ['controller', 'compute', 'mongo', 'ceph-osd']:
            node_list = get_node_list(role)
            for node in node_list:
                node_info = {}
                node_info['role'] = role
                node_info['name'] = node
                nodes.append(node_info)
        result = run_doctor_on_nodes(nodes, check_cmd)
        for res in result:
            LOG.info(res, remote=True)
    else:
        for i in register.all:
            eval(i)()
Example #15
0
def check_nodes(node_role, check_obj, multi_role=False):
    if multi_role:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor stack --' + check_obj
        else:
            check_cmd = 'sudo eayunstack doctor stack --' + check_obj
    else:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor stack --' + check_obj + ' --%s' % node_role
        else:
            check_cmd = 'sudo eayunstack doctor stack --' + check_obj + ' --%s' % node_role
    node_list = get_node_list(node_role)
    if len(node_list) == 0:
        LOG.warn('Node list is null !')
        return
    (proc_list, pipe) = run_doctor_on_nodes(node_role, node_list, check_cmd)
    for proc in proc_list:
        proc.join()
    LOG.info(pipe.recv(), remote=True)
Example #16
0
def check_nodes(node_role, check_obj, multi_role=False):
    if multi_role:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor stack --' + check_obj
        else:
            check_cmd = 'sudo eayunstack doctor stack --' + check_obj
    else:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor stack --' + check_obj + ' --%s' % node_role
        else:
            check_cmd = 'sudo eayunstack doctor stack --' + check_obj + ' --%s' % node_role
    node_list = get_node_list(node_role)
    if len(node_list) == 0:
        LOG.warn('Node list is null !')
        return
    nodes = []
    for node in node_list:
        node_info = {}
        node_info['role'] = node_role
        node_info['name'] = node
        nodes.append(node_info)
    result = run_doctor_on_nodes(nodes, check_cmd)
    for res in result:
        LOG.info(res, remote=True)
Example #17
0
def check_nodes(node_role, check_obj, multi_role=False):
    if multi_role:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor stack --' + check_obj
        else:
            check_cmd = 'sudo eayunstack doctor stack --' + check_obj
    else:
        if LOG.enable_debug:
            check_cmd = 'sudo eayunstack --debug doctor stack --' + check_obj + ' --%s' % node_role
        else:
            check_cmd = 'sudo eayunstack doctor stack --' + check_obj + ' --%s' % node_role
    node_list = get_node_list(node_role)
    if len(node_list) == 0:
        LOG.warn('Node list is null !')
        return
    nodes = []
    for node in node_list:
        node_info = {}
        node_info['role'] = node_role
        node_info['name'] = node
        nodes.append(node_info)
    result = run_doctor_on_nodes(nodes, check_cmd)
    for res in result:
        LOG.info(res, remote=True)