'When the set of live nodes change, the loadbalancer will change its
mind on host distances. It might change it on the node that came/left
but also on other nodes (for instance, if a node dies, another
previously ignored node may be now considered).
This method ensures that all hosts for which a pool should exist
have one, and hosts that shouldn\'t don\'t.
For internal use only.'

def update_created_pools(self):

    futures = set()
    for host in self.cluster.metadata.all_hosts():
        distance = self._profile_manager.distance(host)
        pool = self._pools.get(host)
        future = None
        if ((not pool) or pool.is_shutdown):
            if ((distance != HostDistance.IGNORED) and (host.is_up in (True, None))):
                future = self.add_or_renew_pool(host, False)
        elif (distance != pool.host_distance):
            if (distance == HostDistance.IGNORED):
                future = self.remove_pool(host)
            else:
                pool.host_distance = distance
        if future:
            futures.add(future)
    return futures
