nova.filter.scheduler glance image metadata

asked 2014-05-29 12:09:03 -0500

Spyderdyne gravatar image

updated 2014-05-29 16:02:57 -0500

I am working through a fairly common use case that it would be nice to be able to use Glance image metadata to address. In a scenario where you have multiple instances performing the same job behind a load balancer you have some degree of fault tolerance built into the application. To ensure that a single hardware failure does not take down all or a significant protion of your cluster it is important to ensure that these instances are spread across multiple physical hosts and hopefully across mutliple racks.

Additionally it is common practice to create images with at least a majority base configuration for the job you intend to have them perform in your workload to reduce the time from instance creation initiation to final configuration and finally adding additional capacity. Heat templates can be configured to spawn new instances when certain performance thresholds are met and can specify these specific images based on the service or component that is being stressed. While the Nova Filter Scheduler DifferentHostFilter method handles this nicely, there is apparently no way to call it directly using glance image metadata.

On further investigation of the methods currently employed by Glance metadata to enforce scheduling they seem to be implementations for specific items that direct Filter Scheduler access as with an API call could address as well with a very few minor. I think that reconfiguring this for direct access to the nova.filter.scheduler methods would probably cover over 95% of all possible use cases.

I am looking for a way to do something along the lines of adding a new option to the "additional common metadata on Glance images" as the documentation suggests, but instead of simply "type": "string", I would like to do something like this in metadata;

"ServerGroupAffinityFilter": {
    "array": ["group": "devweb1"]


"DifferentHostFilterFilter": { "boolean": true }

I don't think that this approach is very elegant though, and would definitely hesitate to rewrite what is already in Glance to handle this unless absolutely necessary. Is anyone already doing this somewhere? If so how is it implemented?

edit retag flag offensive close merge delete


I think this would require a new blueprint.

Spyderdyne gravatar imageSpyderdyne ( 2014-05-29 14:00:21 -0500 )edit