Look up stuck-in-rebooting instances in manager
The poll_rebooting_instances() method for a virt driver can be called periodically from the manager to handle instances that may be stuck in a rebooting state. The only information passed to the virt driver is the configured timeout, which means any driver implementing this will have to do the same database query: db.instance_get_all_hung_un_rebooting (..., timeout). This patch makes the manager do this before calling the virt driver, passing the appropriate set of instances, which avoids the need for the driver to make that call. Related to bp/no-db-compute Change-Id: I152cb8cd9a107f2d2b1df39401ab7bbe7ff366f1
This commit is contained in:
@@ -269,7 +269,8 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase):
|
||||
|
||||
@catch_notimplementederror
|
||||
def test_poll_rebooting_instances(self):
|
||||
self.connection.poll_rebooting_instances(10)
|
||||
instances = [self._get_running_instance()]
|
||||
self.connection.poll_rebooting_instances(10, instances)
|
||||
|
||||
@catch_notimplementederror
|
||||
def test_poll_rescued_instances(self):
|
||||
|
Reference in New Issue
Block a user