Skip to content

Commit

Permalink
fix for bug 821252. Smarter default scheduler
Browse files Browse the repository at this point in the history
compute_scheduler_driver = DistributedScheduler

Change-Id: I8123a120afd80c2b088a387eaab8f5a99a877fe0
  • Loading branch information
jogo committed Mar 1, 2012
1 parent d65a4e4 commit 7428cf5
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nova/scheduler/filters/ram_filter.py
Expand Up @@ -22,7 +22,7 @@
LOG = logging.getLogger(__name__)

ram_allocation_ratio_opt = cfg.FloatOpt("ram_allocation_ratio",
default=1.0,
default=1.5,
help="virtual ram to physical ram allocation ratio")

FLAGS = flags.FLAGS
Expand Down
3 changes: 2 additions & 1 deletion nova/scheduler/multi.py
Expand Up @@ -29,7 +29,8 @@

multi_scheduler_opts = [
cfg.StrOpt('compute_scheduler_driver',
default='nova.scheduler.chance.ChanceScheduler',
default='nova.scheduler.'
'distributed_scheduler.DistributedScheduler',
help='Driver to use for scheduling compute calls'),
cfg.StrOpt('volume_scheduler_driver',
default='nova.scheduler.chance.ChanceScheduler',
Expand Down
2 changes: 2 additions & 0 deletions nova/tests/api/ec2/test_cloud.py
Expand Up @@ -94,6 +94,8 @@ def dumb(*args, **kwargs):
self.stubs.Set(utils, 'usage_from_instance', dumb)
# set up our cloud
self.cloud = cloud.CloudController()
self.flags(compute_scheduler_driver='nova.scheduler.'
'chance.ChanceScheduler')

# set up services
self.compute = self.start_service('compute')
Expand Down
1 change: 1 addition & 0 deletions nova/tests/fake_flags.py
Expand Up @@ -42,4 +42,5 @@
FLAGS.set_default('flat_network_bridge', 'br100')
FLAGS.set_default('sqlite_synchronous', False)
flags.DECLARE('policy_file', 'nova.policy')
flags.DECLARE('compute_scheduler_driver', 'nova.scheduler.multi')
FLAGS.set_default('policy_file', 'nova/tests/policy.json')
2 changes: 2 additions & 0 deletions nova/tests/integrated/integrated_helpers.py
Expand Up @@ -69,6 +69,8 @@ def fake_get_image_service(context, image_href):
image_id = str(image_href).split('/')[-1]
return (nova.image.fake.FakeImageService(), image_id)
self.stubs.Set(nova.image, 'get_image_service', fake_get_image_service)
self.flags(compute_scheduler_driver='nova.scheduler.'
'chance.ChanceScheduler')

# set up services
self.compute = self.start_service('compute')
Expand Down
1 change: 1 addition & 0 deletions nova/tests/scheduler/test_host_filters.py
Expand Up @@ -177,6 +177,7 @@ def test_compute_filter_passes(self):
def test_ram_filter_fails_on_memory(self):
self._stub_service_is_up(True)
filt_cls = self.class_map['RamFilter']()
self.flags(ram_allocation_ratio=1.0)
filter_properties = {'instance_type': {'memory_mb': 1024}}
capabilities = {'enabled': True}
service = {'disabled': False}
Expand Down

0 comments on commit 7428cf5

Please sign in to comment.