← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1537062] [NEW] Fail to boot vm when set AggregateImagePropertiesIsolation filter and add custom metadata in the Host Aggregate

 

Public bug reported:


Image has no custom metadata, should not affect the AggregateImagePropertiesIsolation filter

Reproduce steps:

(1) add Host Aggregate with custom metadata
+----+-----------+-------------------+--------------+------------+
| Id | Name      | Availability Zone | Hosts        | Metadata   |
+----+-----------+-------------------+--------------+------------+
| 1  | linux-agg | -                 | 'controller' | 'os=linux' |
+----+-----------+-------------------+--------------+------------+ 

(2) add  AggregateImagePropertiesIsolation filter
scheduler_default_filters =         RetryFilter,AggregateImagePropertiesIsolation,AvailabilityZoneFilter,RamFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter,DifferentHostFilter
  
(3) boot vm and error log:
2016-01-22 21:00:10.834 ERROR oslo_messaging.rpc.dispatcher [req-1cded809-cfe6-4657-8e31-b494f1b3278d admin admin] Exception during messa
ge handling: ImageMetaProps object has no attribute 'os'
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", l
ine 143, in _dispatch_and_reply
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", l
ine 189, in _dispatch
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", l
ine 130, in _do_dispatch
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 
150, in inner
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     return func(*args, **kwargs)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/manager.py", line 78, in select_destin
ations
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     dests = self.driver.select_destinations(ctxt, spec_obj)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 53, in sele
ct_destinations
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     selected_hosts = self._schedule(context, spec_obj)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 113, in _sc
hedule
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     spec_obj, index=num)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/host_manager.py", line 532, in get_fil
tered_hosts
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     hosts, spec_obj, index)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/filters.py", line 89, in get_filtered_objects
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     list_objs = list(objs)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/filters.py", line 44, in filter_all
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     if self._filter_one(obj, spec_obj):
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/filters/__init__.py", line 26, in _filter_one
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     return self.host_passes(obj, filter_properties)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/filters/aggregate_image_properties_isolation.py", line 48, in host_passes
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     prop = image_props.get(key)
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/objects/image_meta.py", line 540, in get
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     if not self.obj_attr_is_set(name):
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 658, in obj_attr_is_set
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     {'objname': self.obj_name(), 'attrname': attrname})
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher AttributeError: ImageMetaProps object has no attribute 'os'
2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher

** Affects: nova
     Importance: Undecided
     Assignee: Xiaowei Qian (xiaow-qian)
         Status: New


** Tags: nova scheduler

** Changed in: nova
     Assignee: (unassigned) => Xiaowei Qian (xiaow-qian)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1537062

Title:
  Fail to boot vm when set AggregateImagePropertiesIsolation filter and
  add custom metadata in the Host Aggregate

Status in OpenStack Compute (nova):
  New

Bug description:
  
  Image has no custom metadata, should not affect the AggregateImagePropertiesIsolation filter

  Reproduce steps:

  (1) add Host Aggregate with custom metadata
  +----+-----------+-------------------+--------------+------------+
  | Id | Name      | Availability Zone | Hosts        | Metadata   |
  +----+-----------+-------------------+--------------+------------+
  | 1  | linux-agg | -                 | 'controller' | 'os=linux' |
  +----+-----------+-------------------+--------------+------------+ 

  (2) add  AggregateImagePropertiesIsolation filter
  scheduler_default_filters =         RetryFilter,AggregateImagePropertiesIsolation,AvailabilityZoneFilter,RamFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter,DifferentHostFilter
    
  (3) boot vm and error log:
  2016-01-22 21:00:10.834 ERROR oslo_messaging.rpc.dispatcher [req-1cded809-cfe6-4657-8e31-b494f1b3278d admin admin] Exception during messa
  ge handling: ImageMetaProps object has no attribute 'os'
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", l
  ine 143, in _dispatch_and_reply
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     executor_callback))
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", l
  ine 189, in _dispatch
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     executor_callback)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", l
  ine 130, in _do_dispatch
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 
  150, in inner
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     return func(*args, **kwargs)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/manager.py", line 78, in select_destin
  ations
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     dests = self.driver.select_destinations(ctxt, spec_obj)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 53, in sele
  ct_destinations
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     selected_hosts = self._schedule(context, spec_obj)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 113, in _sc
  hedule
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     spec_obj, index=num)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/host_manager.py", line 532, in get_fil
  tered_hosts
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     hosts, spec_obj, index)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/filters.py", line 89, in get_filtered_objects
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     list_objs = list(objs)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/filters.py", line 44, in filter_all
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     if self._filter_one(obj, spec_obj):
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/filters/__init__.py", line 26, in _filter_one
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     return self.host_passes(obj, filter_properties)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/scheduler/filters/aggregate_image_properties_isolation.py", line 48, in host_passes
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     prop = image_props.get(key)
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/opt/stack/nova/nova/objects/image_meta.py", line 540, in get
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     if not self.obj_attr_is_set(name):
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 658, in obj_attr_is_set
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher     {'objname': self.obj_name(), 'attrname': attrname})
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher AttributeError: ImageMetaProps object has no attribute 'os'
  2016-01-22 21:00:10.834 TRACE oslo_messaging.rpc.dispatcher

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1537062/+subscriptions


Follow ups