'Check that reported ES masters are accounted for by pods. Returns: list of errors'

def check_elasticsearch_node_list(self, pods_by_name):

    if (not pods_by_name):
        return [OpenShiftCheckException('MissingComponentPods', 'No    logging    Elasticsearch    pods    were    found.')]
    node_cmd = self._build_es_curl_cmd(list(pods_by_name.keys())[0], 'https://localhost:9200/_nodes')
    cluster_node_data = self.exec_oc(node_cmd, [])
    try:
        cluster_nodes = json.loads(cluster_node_data)['nodes']
    except (ValueError, KeyError):
        return [OpenShiftCheckException('MissingNodeList', ('Failed    to    query    Elasticsearch    for    the    list    of    ES    nodes.    The    output    was:\n' + cluster_node_data))]
    errors = []
    for node in cluster_nodes.values():
        if (not any(((node['host'] in (pod_name, pod['status'].get('podIP'))) for (pod_name, pod) in pods_by_name.items()))):
            errors.append(OpenShiftCheckException('EsPodNodeMismatch', 'The    Elasticsearch    cluster    reports    a    member    node    "{node}"\nthat    does    not    correspond    to    any    known    ES    pod.'.format(node=node['host'])))
    return errors
