@@ -85,10 +85,6 @@ def test_node_rebalance_deleted_compute_node_race(self):
85
85
86
86
# host_b[1]: Finds no compute record in RT. Tries to create one
87
87
# (_init_compute_node).
88
- # FIXME(mgoddard): This shows a traceback with SQL rollback due to
89
- # soft-deleted node. The create seems to succeed but breaks the RT
90
- # update for this node. See
91
- # https://bugs.launchpad.net/nova/+bug/1853159.
92
88
host_b .manager .update_available_resource (self .ctxt )
93
89
self ._assert_hypervisor_api (self .nodename , expected_host = 'host_b' )
94
90
# There should only be one resource provider (fake-node).
@@ -164,41 +160,12 @@ def test_node_rebalance_deleted_compute_node_race(self):
164
160
self .ctxt , cn , cascade = True )
165
161
166
162
# host_b[3]: Should recreate compute node and resource provider.
167
- # FIXME(mgoddard): Resource provider not recreated here, due to
168
- # https://bugs.launchpad.net/nova/+bug/1853159.
169
163
host_b .manager .update_available_resource (self .ctxt )
170
164
171
165
# Verify that the node was recreated.
172
166
self ._assert_hypervisor_api (self .nodename , 'host_b' )
173
167
174
- # But due to https://bugs.launchpad.net/nova/+bug/1853159 the compute
175
- # node is not cached in the RT.
176
- self .assertNotIn (self .nodename , host_b .manager .rt .compute_nodes )
177
-
178
- # There is no RP.
179
- rps = self ._get_all_providers ()
180
- self .assertEqual (0 , len (rps ), rps )
181
-
182
- # But the RP exists in the provider tree.
183
- self .assertFalse (host_b .manager .rt .reportclient ._provider_tree .exists (
184
- self .nodename ))
185
-
186
- # host_b[1]: Should add compute node to RT cache and recreate resource
187
- # provider.
188
- host_b .manager .update_available_resource (self .ctxt )
189
-
190
- # Verify that the node still exists.
191
- self ._assert_hypervisor_api (self .nodename , 'host_b' )
192
-
193
- # And it is now in the RT cache.
194
- self .assertIn (self .nodename , host_b .manager .rt .compute_nodes )
195
-
196
168
# The resource provider has now been created.
197
169
rps = self ._get_all_providers ()
198
170
self .assertEqual (1 , len (rps ), rps )
199
171
self .assertEqual (self .nodename , rps [0 ]['name' ])
200
-
201
- # This fails due to the lack of a resource provider.
202
- self .assertIn (
203
- 'Skipping removal of allocations for deleted instances' ,
204
- self .stdlog .logger .output )
0 commit comments