[openstack-dev] [scheduler] Making nova-scheduler extension friendly

David Scannell dscannell at gridcentric.com
Tue Jan 22 16:15:48 UTC 2013

On Wed, Jan 16, 2013 at 6:33 PM, Russell Bryant <rbryant at redhat.com> wrote:
> On 01/16/2013 06:23 PM, Chris Behrens wrote:
>> There's movement to move common scheduler code into oslo… at which point it definitely needs to be generic enough to handle the basic functionality of scheduling for both nova and cinder.
>> There's also discussion about turning the scheduler into its own openstack service… (there may be a blueprint for this already).   As an example, when using volumes with compute, you may want to schedule an instance based on both compute and volume information.  This type of scheduler doesn't belong in nova because volumes live outside.   A new scheduling service that knows about 'all of the things' is needed.  When we have that, how scheduling works in nova changes quite a bit.  Nova would ask the scheduler questions and get responses vs proxying messages via it.

I like the idea of being able to query the scheduler instead of proxying
messages through it. In this case, an extension can simply ask the
scheduler to pick a host and then make the appropriate communication
with its manager service on that host.

In other words, instead of enhancing the scheduler to support multiple
topics, we can add a simple method that just returns the best host(s):

    def select_hosts(context, request_spec, filter_properties):
        # returns the best hosts that satisfies the request

It looks like a good step in the direction of a common scheduler service
and we can start asking the scheduler for information instead of proxying
through it.

> I would look at helping make as much of the scheduler code generic
> enough to move into oslo-incubator so that it can be shared between nova
> and cinder.  If it's generic enough to be shared between those two, it
> may be generic enough to use in your own custom service.

We can probably refactor some of the filter_scheduler and chance_scheduler
so that there is a common select_hosts(...) for both cinder & nova. Then the
drivers in the respective projects could subclass the olso-incubator one and
have their _scheduler(...) method call to the common select_hosts(...).


More information about the OpenStack-dev mailing list