[Openstack] looking for a Nova scheduler filter plugin to boot nodes on named hosts

Day, Phil philip.day at hp.com
Tue Oct 16 15:28:14 UTC 2012

Hi Chrsitian,

I'm not sure it's a great use case for a scheduler filter, as the filters are cumulative (so each filter only gets the hosts that the other filters in the stack have agreed are ok), and even before you get to the filters the host manager will take out from the list any of the hosts which are marked as disabled (and one of our use cases is to be able to schedule to a disable host).

The current forcing via the az name seems to me to be in the right place architecturally - so if we can change that from being admin only to gated on a specific keystone role (after all we still want to control how can do this) then it seems to me that all the rest of the capability is already there.

If you want to schedule to a specific subset of hosts then take a look at host aggregates - these were generalised in Folsom specifically to support this, and the scheduler is already aggregate aware.


From: Christian Parpart [mailto:trapni at gmail.com]
Sent: 16 October 2012 15:35
To: Day, Phil
Cc: GMI M; <openstack at lists.launchpad.net>
Subject: Re: [Openstack] looking for a Nova scheduler filter plugin to boot nodes on named hosts

Hey all,

many thanks for your replies so far.

In general, I must say that there really is an absolute need for explicit provisioning, that is, deciding by the admin what single host to prefer (but still to reject when there're just no resources left of course).

- Filter like SameHost filter only works when there is already a host, and then you've to look up and built up the correlation first (not a big problem, but doesn't feel comfortable).
- IsolatedHosts filter doesn't make that much sense, as we are using one general "template-%{TIMESTAMP}" to bootstrap some node and then set up everything else inside, and we usually still may have more than one VM on that compute node (e.g. a memcached VM and a postfix VM).
- availability zones, so I got told, are deprecated already (dunno) and I can't give every compute node a different availability zone, as - tbh - that's what I have hostnames for :-)

Philip, I'd really like to dive into developing such a plugin, let's call it HostnameFilter-plugin, that the operator can pass one (or a set of) hostname(s) that are allowed to spawn the VM on.
However, I just wrote Python once, and even dislike the syntax a bit, not saying I hate it, but still :-)

Is there any guide (/tutorial) for reference (or hello_world nova scheduler plugin) I can look at to learn on how to write such a plugin?

Many thanks for your replies so far,
Christian Parpart.
On Tue, Oct 16, 2012 at 4:22 PM, Day, Phil <philip.day at hp.com<mailto:philip.day at hp.com>> wrote:
Hi Christian,

For a more general solution you might want to look at the code that supports passing in "-availabilty_zone=az:host" (look for forced_host in compute/api.py).  Currently this is limited to admin, but I think that should be changed to be a specific action that can be controlled by policy (we have a change in preparation for this).


From: openstack-bounces+philip.day=hp.com at lists.launchpad.net<mailto:hp.com at lists.launchpad.net> [mailto:openstack-bounces+philip.day<mailto:openstack-bounces%2Bphilip.day>=hp.com at lists.launchpad.net<mailto:hp.com at lists.launchpad.net>] On Behalf Of GMI M
Sent: 16 October 2012 15:13
To: Christian Parpart
Cc: <openstack at lists.launchpad.net<mailto:openstack at lists.launchpad.net>>
Subject: Re: [Openstack] looking for a Nova scheduler filter plugin to boot nodes on named hosts

Hi Christian,

I think you might be able to use the existing filters in Essex.
For example, you can add the following lines in the nova.conf of the controller host (or where nova-scheduler runs) and restart nova-scheduler:


This will allow you to run the image with ID "sadsd1e35dfe63" only on the compute host "nova7".
You can also pass a list of compute servers in the isolated_hosts, if you have the need.

I certainly see the use-case for this feature, for example when you want to run Windows based instances and you don't want to buy a Windows datacenter license for each nova-compute host, but only for a few that will run Windows instances.

I hope this helps you.

On Mon, Oct 15, 2012 at 7:45 PM, Christian Parpart <trapni at gmail.com<mailto:trapni at gmail.com>> wrote:
Hi all,

I am looking for a (Essex) Nova scheduler plugin that parses the scheduler_hints to get a hostname of the
hypervisor to spawn the actual VM on, rejecting any other node.

This allows us to explicitely spawn a VM on a certain host (yes, there are really usecases where you want that). :-)

I was trying to build my own and searching around since I couldn't believe I was the only one, but didn't find one yet.

Does anyone of you maybe have the skills to actually write that simple plugin, or even maybe knows where such
a plugin has already been developed?

Many thanks in advance,
Christian Parpart.

Mailing list: https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
Post to     : openstack at lists.launchpad.net<mailto:openstack at lists.launchpad.net>
Unsubscribe : https://launchpad.net/~openstack<https://launchpad.net/%7Eopenstack>
More help   : https://help.launchpad.net/ListHelp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121016/a1f0cc7e/attachment.html>

More information about the Openstack mailing list