[ops][glance][nova] scheduling problem because of ImagePropertiesFilter

Brian Rosmaita rosmaita.fossdev at gmail.com
Wed Jul 17 15:37:02 UTC 2019


On 7/17/19 8:14 AM, Massimo Sgaravatto wrote:
> We have just finished the update of our cloud to Rocky but we are seeing
> a strange issue with images with property:
> hypervisor_type='QEMU'
> 
> The scheduling of instances created with such images fails because of
> the ImagePropertiesFilter [*]
> 
> Removing that property from the image, the scheduling works.
> We also tried changing hypervisor_type='QEMU'
> --> hypervisor_type='qemu', but this didn't help.
> 
> Any suggestions?

Commit e792d50efadb36437e82381f4c84d738cee25dfd in Ocata changed the
image metadata that the ImagePropertiesFilter pays attention to:

diff --git a/nova/scheduler/filters/image_props_filter.py
b/nova/scheduler/filters/image_props_filter.py
index 06def5c769..521a6816a3 100644
--- a/nova/scheduler/filters/image_props_filter.py
+++ b/nova/scheduler/filters/image_props_filter.py
@@ -43,9 +43,9 @@ class ImagePropertiesFilter(filters.BaseHostFilter):

     def _instance_supported(self, host_state, image_props,
                             hypervisor_version):
-        img_arch = image_props.get('architecture', None)
-        img_h_type = image_props.get('hypervisor_type', None)
-        img_vm_mode = image_props.get('vm_mode', None)
+        img_arch = image_props.get('hw_architecture')
+        img_h_type = image_props.get('img_hv_type')
+        img_vm_mode = image_props.get('hw_vm_mode')
         checked_img_props = (
             arch.canonicalize(img_arch),
             hv_type.canonicalize(img_h_type),

Looks like 'img_hv_type' is the metadata key you need to use.

If that works, please put up a patch to the Glance "useful image
properties" docs [0], we seem to be out of date on this issue.

[0]
https://opendev.org/openstack/glance/src/branch/master/doc/source/admin/useful-image-properties.rst

cheers,
brian

> Thanks, Massimo
> 
> 
> 
> [*]
> 2019-07-17 13:52:58.148 13312 INFO nova.filters
> [req-1863bef0-0326-46d1-a836-436227e91eef
> 6e3b136d578f4292a5c03b16f443ab3d d27fe2becea94a3e980fb9f66e2f291a -
> default default] Filtering removed all hosts f\
> or the request with instance ID '63810b60-76e4-4e76-a1c3-e4d3932c002e'.
> Filter results: ['AggregateMultiTenancyIsolation: (start: 49, end: 37)',
> 'AggregateInstanceExtraSpecsFilter: (start: 37, end: 34)', \
> 'RetryFilter: (start: 34, end: 34)', 'AvailabilityZoneFilter: (start:
> 34, end: 34)', 'ComputeFilter: (start: 34, end: 32)',
> 'ComputeCapabilitiesFilter: (start: 32, end: 32)',
> 'ImagePropertiesFilter: (star\
> t: 32, end: 0)']




More information about the openstack-discuss mailing list