@@ -1116,14 +1116,6 @@ def _numa_fit_instance_cell(host_cell, instance_cell, limit_cell=None,
11161116 'actual' : host_cell .memory })
11171117 return
11181118
1119- # The 'pcpuset' field is only set by newer compute nodes, so if it's
1120- # not present then we've received this object from a pre-Train compute
1121- # node and need to query against the 'cpuset' field instead until the
1122- # compute node has been upgraded and starts reporting things properly.
1123- # TODO(stephenfin): Remove in U
1124- if 'pcpuset' not in host_cell :
1125- host_cell .pcpuset = host_cell .cpuset
1126-
11271119 # NOTE(stephenfin): As with memory, do not allow an instance to overcommit
11281120 # against itself on any NUMA cell
11291121 if instance_cell .cpu_policy == fields .CPUAllocationPolicy .DEDICATED :
@@ -1781,7 +1773,6 @@ def get_pci_numa_policy_constraint(flavor, image_meta):
17811773 return policy
17821774
17831775
1784- # TODO(sahid): Move numa related to hardware/numa.py
17851776def numa_get_constraints (flavor , image_meta ):
17861777 """Return topology related to input request.
17871778
@@ -1872,7 +1863,6 @@ def numa_get_constraints(flavor, image_meta):
18721863 requested_vcpus , requested_pcpus = _get_vcpu_pcpu_resources (flavor )
18731864
18741865 if cpu_policy and (requested_vcpus or requested_pcpus ):
1875- # TODO(stephenfin): Make these custom exceptions
18761866 raise exception .InvalidRequest (
18771867 "It is not possible to use the 'resources:VCPU' or "
18781868 "'resources:PCPU' extra specs in combination with the "
@@ -2086,8 +2076,6 @@ def numa_fit_instance_to_host(
20862076 host_cells = sorted (host_cells , key = lambda cell : cell .id in [
20872077 pool ['numa_node' ] for pool in pci_stats .pools ])
20882078
2089- # TODO(ndipanov): We may want to sort permutations differently
2090- # depending on whether we want packing/spreading over NUMA nodes
20912079 for host_cell_perm in itertools .permutations (
20922080 host_cells , len (instance_topology )):
20932081 chosen_instance_cells : ty .List ['objects.InstanceNUMACell' ] = []
@@ -2216,23 +2204,10 @@ def numa_usage_from_instance_numa(host_topology, instance_topology,
22162204 memory_usage = host_cell .memory_usage
22172205 shared_cpus_usage = host_cell .cpu_usage
22182206
2219- # The 'pcpuset' field is only set by newer compute nodes, so if it's
2220- # not present then we've received this object from a pre-Train compute
2221- # node and need to dual-report all CPUS listed therein as both
2222- # dedicated and shared until the compute node has been upgraded and
2223- # starts reporting things properly.
2224- # TODO(stephenfin): Remove in U
2225- if 'pcpuset' not in host_cell :
2226- shared_cpus = host_cell .cpuset
2227- dedicated_cpus = host_cell .cpuset
2228- else :
2229- shared_cpus = host_cell .cpuset
2230- dedicated_cpus = host_cell .pcpuset
2231-
22322207 new_cell = objects .NUMACell (
22332208 id = host_cell .id ,
2234- cpuset = shared_cpus ,
2235- pcpuset = dedicated_cpus ,
2209+ cpuset = host_cell . cpuset ,
2210+ pcpuset = host_cell . pcpuset ,
22362211 memory = host_cell .memory ,
22372212 cpu_usage = 0 ,
22382213 memory_usage = 0 ,
0 commit comments