Exemple #1
0
def _get_cluster_hosts_information(host, cluster):
    for c in conductor.cluster_get_all(context.ctx()):
        if c.id == cluster.id:
            continue

        for i in u.get_instances(c):
            if i.instance_name == host:
                return g.generate_etc_hosts(c)

    return None
Exemple #2
0
def _get_cluster_hosts_information(host, cluster):
    for c in conductor.cluster_get_all(context.ctx()):
        if c.id == cluster.id:
            continue

        for i in u.get_instances(c):
            if i.instance_name == host:
                return g.generate_etc_hosts(c)

    return None
Exemple #3
0
    def _configure_instances(self, cluster):
        """Configure active instances.

        * generate /etc/hosts
        * setup passwordless login
        * etc.
        """
        hosts_file = g.generate_etc_hosts(cluster)

        with context.ThreadGroup() as tg:
            for node_group in cluster.node_groups:
                for instance in node_group.instances:
                    tg.spawn("configure-instance-%s" % instance.instance_name,
                             self._configure_instance, instance, hosts_file)
Exemple #4
0
    def _configure_instances(self, cluster):
        """Configure active instances.

        * generate /etc/hosts
        * setup passwordless login
        * etc.
        """
        hosts_file = g.generate_etc_hosts(cluster)

        with context.ThreadGroup() as tg:
            for node_group in cluster.node_groups:
                for instance in node_group.instances:
                    tg.spawn("configure-instance-%s" % instance.instance_name,
                             self._configure_instance, instance, hosts_file)