Use custom metadata in nova scheduler filter

asked 2016-11-07 07:28:39 -0600

mkeller0815 gravatar image


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.

edit retag flag offensive close merge delete


Mario, Were you able to find a proper solution for this? I am currently facing the same issue and am unable to find a proper configuration other than editing the fields dict which would prefer not to do.

Thanks, Preston Rodriguez

guiltybeta gravatar imageguiltybeta ( 2017-07-14 09:38:40 -0600 )edit