'Receives the uuids of the instances on a host.
This method is periodically called by the compute nodes, which send a
list of all the UUID values for the instances on that node. This is
used by the scheduler\'s HostManager to detect when its view of the
compute node\'s instances is out of sync.'

@utils.synchronized(HOST_INSTANCE_SEMAPHORE)
def sync_instance_info(self, context, host_name, instance_uuids):

    host_info = self._instance_info.get(host_name)
    if host_info:
        local_set = set(host_info['instances'].keys())
        compute_set = set(instance_uuids)
        if (not (local_set == compute_set)):
            self._recreate_instance_info(context, host_name)
            LOG.info(_LI("The    instance    sync    for    host    '%s'    did    not    match.    Re-created    its    InstanceList."), host_name)
            return
        host_info['updated'] = True
        LOG.info(_LI("Successfully    synced    instances    from    host    '%s'."), host_name)
    else:
        self._recreate_instance_info(context, host_name)
        LOG.info(_LI("Received    a    sync    request    from    an    unknown    host    '%s'.    Re-created    its    InstanceList."), host_name)
