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.
So this happens only on NUMA hosts where we hit the following branch of NUMA fitting code.
if topology:
viable_ cells = [cell for cell in topology.cells
if vcpus <= len(cell.cpus) and
memory * 1024 <= cell.memory]
# 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
# Host is NUMA capable so try to keep the instance in a cell
if not viable_cells:
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.