Skip to content

Commit

Permalink
Merge "Updates simple scheduler to allow strict availability_zone sch…
Browse files Browse the repository at this point in the history
…eduling"
  • Loading branch information
Jenkins authored and openstack-gerrit committed Dec 2, 2011
2 parents ab215c4 + 3b29258 commit 7fc79c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Authors
Expand Up @@ -68,6 +68,7 @@ John Tran <jtran@attinteractive.com>
Jonathan Bryce <jbryce@jbryce.com>
Jordan Rinke <jordan@openstack.org>
Joseph Suh <jsuh@isi.edu>
Joseph W. Breu <breu@breu.org>
Josh Durgin <joshd@hq.newdream.net>
Josh Kearney <josh@jk0.org>
Josh Kleinpeter <josh@kleinpeter.org>
Expand Down Expand Up @@ -133,6 +134,7 @@ Vasiliy Shlykov <vash@vasiliyshlykov.org>
Vishvananda Ishaya <vishvananda@gmail.com>
Vivek Y S <vivek.ys@gmail.com>
Vladimir Popovski <vladimir@zadarastorage.com>
William Kelly <william.kelly@rackspace.com>
William Wolf <throughnothing@gmail.com>
Yoshiaki Tamura <yoshi@midokura.jp>
Youcef Laribi <Youcef.Laribi@eu.citrix.com>
Expand Down
4 changes: 3 additions & 1 deletion nova/scheduler/simple.py
Expand Up @@ -34,6 +34,8 @@
"maximum number of volume gigabytes to allow per host")
flags.DEFINE_integer("max_networks", 1000,
"maximum number of networks to allow per host")
flags.DEFINE_string('default_schedule_zone', None,
'zone to use when user doesnt specify one')


class SimpleScheduler(chance.ChanceScheduler):
Expand All @@ -45,7 +47,7 @@ def _schedule_instance(self, context, instance_opts, *_args, **_kwargs):

availability_zone = instance_opts.get('availability_zone')

zone, host = None, None
zone, host = FLAGS.default_schedule_zone, None
if availability_zone:
zone, _x, host = availability_zone.partition(':')

Expand Down

0 comments on commit 7fc79c4

Please sign in to comment.