@@ -138,22 +138,16 @@ def test_create_server_with_numa_topology_and_cpu_topology_and_pinning(
138
138
'hw:cpu_max_sockets' : '2' ,
139
139
'hw:cpu_max_cores' : '2' ,
140
140
'hw:cpu_max_threads' : '8' ,
141
- 'hw:cpu_policy' : 'dedicated' ,
142
- 'hw:mem_page_size' : 'any'
143
- }
141
+ 'hw:cpu_policy' : 'dedicated' }
144
142
flavor_id = self ._create_flavor (vcpu = 8 , extra_spec = extra_spec )
145
- self ._run_build_test (flavor_id , end_status = 'ERROR' )
143
+ server = self ._run_build_test (flavor_id )
146
144
147
- # FIXME(sean-k-mooney): The instance should boot but
148
- # it fails due to https://bugs.launchpad.net/nova/+bug/1910466
149
- msg = "IndexError: list index out of range"
150
- self .assertIn (msg , self .stdlog .logger .output )
151
- # ctx = nova_context.get_admin_context()
152
- # inst = objects.Instance.get_by_uuid(ctx, server['id'])
153
- # self.assertEqual(2, len(inst.numa_topology.cells))
154
- # self.assertLessEqual(inst.vcpu_model.topology.sockets, 2)
155
- # self.assertLessEqual(inst.vcpu_model.topology.cores, 2)
156
- # self.assertLessEqual(inst.vcpu_model.topology.threads, 8)
145
+ ctx = nova_context .get_admin_context ()
146
+ inst = objects .Instance .get_by_uuid (ctx , server ['id' ])
147
+ self .assertEqual (2 , len (inst .numa_topology .cells ))
148
+ self .assertLessEqual (inst .vcpu_model .topology .sockets , 2 )
149
+ self .assertLessEqual (inst .vcpu_model .topology .cores , 2 )
150
+ self .assertLessEqual (inst .vcpu_model .topology .threads , 8 )
157
151
158
152
def test_create_server_with_numa_fails (self ):
159
153
"""Create a two NUMA node instance on a host with only one node.
@@ -252,7 +246,7 @@ def test_create_server_with_dedicated_policy(self):
252
246
253
247
inst = objects .Instance .get_by_uuid (self .ctxt , server ['id' ])
254
248
self .assertEqual (1 , len (inst .numa_topology .cells ))
255
- self .assertEqual (5 , inst .numa_topology . cells [ 0 ]. cpu_topology . cores )
249
+ self .assertEqual (5 , inst .vcpu_model . topology . sockets )
256
250
257
251
def test_create_server_with_mixed_policy (self ):
258
252
"""Create a server using the 'hw:cpu_policy=mixed' extra spec.
@@ -302,7 +296,6 @@ def test_create_server_with_mixed_policy(self):
302
296
# sanity check the instance topology
303
297
inst = objects .Instance .get_by_uuid (self .ctxt , server ['id' ])
304
298
self .assertEqual (1 , len (inst .numa_topology .cells ))
305
- self .assertEqual (4 , inst .numa_topology .cells [0 ].cpu_topology .cores )
306
299
self .assertEqual ({0 }, inst .numa_topology .cells [0 ].cpuset )
307
300
self .assertEqual ({1 , 2 , 3 }, inst .numa_topology .cells [0 ].pcpuset )
308
301
self .assertEqual (
@@ -511,8 +504,6 @@ def test_create_server_with_pcpu(self):
511
504
ctx = nova_context .get_admin_context ()
512
505
inst = objects .Instance .get_by_uuid (ctx , server ['id' ])
513
506
self .assertEqual (1 , len (inst .numa_topology .cells ))
514
- self .assertEqual (1 , inst .numa_topology .cells [0 ].cpu_topology .cores )
515
- self .assertEqual (2 , inst .numa_topology .cells [0 ].cpu_topology .threads )
516
507
517
508
def test_create_server_with_pcpu_fails (self ):
518
509
"""Create a pinned instance on a host with no PCPUs.
0 commit comments