← Back to team overview

openstack team mailing list archive

[OpenStack][nova]host and node difference

 

Hi,

I noticed that now in nova::host_manager.py, the function
get_all_host_states() is returnning constructing a state key with host and
node.

def get_all_host_states(self, context):
        """Returns a list of HostStates that represents all the hosts
        the HostManager knows about. Also, each of the consumable resources
        in HostState are pre-populated and adjusted based on data in the db.
        """

        # Get resource usage across the available compute nodes:
        compute_nodes = db.compute_node_get_all(context)
        seen_nodes = set()
        for compute in compute_nodes:
            service = compute['service']
            if not service:
                LOG.warn(_("No service for compute ID %s") % compute['id'])
                continue
            host = service['host']  <<<<<<<<
            node = compute.get('hypervisor_hostname') <<<<<<<<
            state_key = (host, node) <<<<<<<<

Can someone show me a case when host and node are different?

Thanks,

Jay