Beispiel #1
0
def check_zone_up(env, dockers_num):
    key = 'oz_worker_nodes'
    assert dockers_num == len(env[key])
    dns = env['dns']
    # Will throw if the dns address is not legal
    socket.inet_aton(dns)
    # Check connectivity to nodes using the DNS
    # Check OZ nodes
    # oz_node is in form [email protected]
    for oz_node in env[key]:
        (oz_name, sep, oz_hostname) = oz_node.partition('@')
        oz_ip = net_utils.dns_lookup(oz_hostname, dns)
        assert net_utils.ping(oz_ip)
        assert net_utils.check_http_connectivity(oz_ip, 443, '/', 200,
                                                 number_of_retries=50)

    # Check OZ DB nodes
    # oz_db_node is in form [email protected]
    for oz_db_node in env['oz_db_nodes']:
        (oz_db_name, sep, oz_db_hostname) = oz_db_node.partition('@')
        oz_db_ip = net_utils.dns_lookup(oz_db_hostname, dns)
        assert net_utils.ping(oz_db_ip)
        assert net_utils.check_http_connectivity(oz_db_ip, 5984, '/_utils/',
                                                 200, use_ssl=False,
                                                 number_of_retries=50)
Beispiel #2
0
def check_cluster_worker_up(env, dockers_num):
    key = 'cluster_worker_nodes'
    assert dockers_num == len(env[key])
    dns = env['dns']
    # Will throw if the dns address is not legal
    socket.inet_aton(dns)
    for node in env[key]:
        (name, sep, hostname) = node.partition('@')
        ip = net_utils.dns_lookup(hostname, dns)
        assert net_utils.ping(ip)
        assert net_utils.check_http_connectivity(ip, 6666, '/nagios', 200,
                                                 use_ssl=False,
                                                 number_of_retries=50)
Beispiel #3
0
def check_appmock_up(env, dockers_num):
    key = 'appmock_nodes'
    assert dockers_num == len(env[key])
    dns = env['dns']
    # Will throw if the dns address is not legal
    socket.inet_aton(dns)
    # Check connectivity to nodes using the DNS
    # node is in form [email protected]
    for node in env[key]:
        (name, sep, hostname) = node.partition('@')
        ip = net_utils.dns_lookup(hostname, dns)
        assert net_utils.ping(ip)
        assert net_utils.check_http_connectivity(ip, 443, '/test2', 200,
                                                 number_of_retries=50)