Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Use custom metadata in nova scheduler filter


we want to separate created machines based on a cutom meta-data entry in the glance image an the host aggregates we've created. The installation of OpenStack is based on Mitaka in CentOS Machines, using VMware as hypervisor. We have created a /etc/metdefs/ json file to define the additional property that should be used by the filter

"namespace": "OS::Compute::cv-host-agg", 
"display_name": "CV-CUSTOM: Select Host Aggregate", 
"description": "CUSTOM: Select Host Aggregate", 
"visibility": "public", 
"protected": true, 
"resource_type_associations": [
        "name": "OS::Glance::Image" 
        "name": "OS::Nova::Aggregate" 


    "properties": {
        "os_selectagg": {
        "title": "selectagg",
        "description": "CUSTOM: Select Host Aggregate",
        "type": "string",
        "enum": [
"objects": []


The property is set for the images as well as for the host aggregates. During a debug session we can see the out custom property is returned in the glance-api call that is initiated by the nova scheduler, but inside the filter the property is missing. We assume that we're missing something in the namespace definition to have our property handled correctly during the filter call. If we add the name of the property hard to the fields list in /usr/lib/python2.7/site-packages/nova/objects/, the filter works as expected. So it seems not a general problem, but a problem with our definition. Documentation to this is not very verbose. So the question is: How do I correctly define metadata for glance images an host aggergates that can be used by the aggregate_image_properties_isolation or the image_props_filter?

With best regards, Mario Keller.