Comment 1 for bug 1372829

Revision history for this message
Nikola Đipanov (ndipanov) wrote :

So this happens only on NUMA hosts where we hit the following branch of NUMA fitting code.

if topology:
                # Host is NUMA capable so try to keep the instance in a cell
                viable_cells = [cell for cell in topology.cells
                                if vcpus <= len(cell.cpus) and
                                memory * 1024 <= cell.memory]
                if not viable_cells:
                    # We can't contain the instance in a cell - do nothing for
                    # now.
                    # TODO(ndipanov): Attempt to spread the instance accross
                    # NUMA nodes and expose the topology to the instance as an
                    # optimisation
                    return allowed_cpus, None, None
                else:
                    cell = random.choice(viable_cells)
                    pin_cpuset = set(cpu.id for cpu in cell.cpus)
                    if allowed_cpus:
                        pin_cpuset &= allowed_cpus
                    return pin_cpuset, None, None

The issue is that we pass the return value of hardware.get_vcpu_pin_set() which returns a list directly into this method. which assumes it's an instance of set().

We need to make sure that we conver it to a set first.

This bug will break anyone who uses the vcpu_pin_set config option so should be fixed ASAP.