summaryrefslogtreecommitdiffstats
path: root/nova/tests/conductor/test_conductor.py
diff options
context:
space:
mode:
authorHans Lindgren <hanlind@kth.se>2013-04-17 15:52:56 +0200
committerHans Lindgren <hanlind@kth.se>2013-05-08 15:10:17 +0200
commit0f56d8ddb02f54ae389380dcd0790e55f2dcb479 (patch)
tree8cdcb69a616ea10b75390c2c8fb30ba5905a83c0 /nova/tests/conductor/test_conductor.py
parent36b10384724fec9657784980cd2bd38e72b445bc (diff)
downloadnova-0f56d8ddb02f54ae389380dcd0790e55f2dcb479.tar.gz
nova-0f56d8ddb02f54ae389380dcd0790e55f2dcb479.tar.xz
nova-0f56d8ddb02f54ae389380dcd0790e55f2dcb479.zip
Optimize instance queries in compute manager
Some instance queries against the db through the conductor can be optimized to return a reduced set of instances as needed for the job at hand. Most of these are part of periodic tasks, so the win is kind of big. Compute methods where queries can be made more efficient: _get_instances_on_driver _poll_rebooting_instances _poll_rescued_instances _reclaim_queued_deletes _run_image_cache_manager_pass Resolves bug 1169970. Change-Id: I7c2fab48944e34765b3fff8ce10bc64a5cd826c8
Diffstat (limited to 'nova/tests/conductor/test_conductor.py')
-rw-r--r--nova/tests/conductor/test_conductor.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/nova/tests/conductor/test_conductor.py b/nova/tests/conductor/test_conductor.py
index fee919a33..9fc184bea 100644
--- a/nova/tests/conductor/test_conductor.py
+++ b/nova/tests/conductor/test_conductor.py
@@ -341,12 +341,6 @@ class _BaseTestCase(object):
self.context, fake_inst)
self.assertEqual(result, 'fake-result')
- def test_instance_get_all_hung_in_rebooting(self):
- self.mox.StubOutWithMock(db, 'instance_get_all_hung_in_rebooting')
- db.instance_get_all_hung_in_rebooting(self.context, 123)
- self.mox.ReplayAll()
- self.conductor.instance_get_all_hung_in_rebooting(self.context, 123)
-
def test_instance_get_active_by_window_joined(self):
self.mox.StubOutWithMock(db, 'instance_get_active_by_window_joined')
db.instance_get_active_by_window_joined(self.context, 'fake-begin',
@@ -978,18 +972,6 @@ class ConductorAPITestCase(_BaseTestCase, test.TestCase):
self.conductor.block_device_mapping_destroy_by_instance_and_volume(
self.context, fake_inst, 'fake-volume')
- def test_instance_get_all(self):
- self.mox.StubOutWithMock(db, 'instance_get_all_by_filters')
- db.instance_get_all(self.context)
- db.instance_get_all_by_filters(self.context, {'name': 'fake-inst'},
- 'updated_at', 'asc',
- columns_to_join=None)
- self.mox.ReplayAll()
- self.conductor.instance_get_all(self.context)
- self.conductor.instance_get_all_by_filters(self.context,
- {'name': 'fake-inst'},
- 'updated_at', 'asc')
-
def _test_stubbed(self, name, *args, **kwargs):
if args and isinstance(args[0], FakeContext):
ctxt = args[0]