yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #54013
[Bug 1537062] Re: Fail to boot vm when set AggregateImagePropertiesIsolation filter and add custom metadata in the Host Aggregate
Reviewed: https://review.openstack.org/307496
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=85a307d3385ecfd641d7842c6450325410f2d3ba
Submitter: Jenkins
Branch: master
commit 85a307d3385ecfd641d7842c6450325410f2d3ba
Author: EdLeafe <ed@xxxxxxxxx>
Date: Mon Apr 18 21:36:09 2016 +0000
Don't raise error when filtering on custom metadata
Hosts can have custom metadata. There is no restriction on the key names
used in this metadata, so we should not be raising an exception when
checking for the existence of any metadata key.
Originally worked on: https://review.openstack.org/#/c/271401
Co-Authored-By: Xiaowei Qian <xiaowei.qian@xxxxxxxxxxxx>
Closes-Bug: #1537062
Change-Id: Ie5ff3c1847e9c4533822a77d443e4ce1fcf047fe
** Changed in: nova
Status: In Progress => Fix Released
--
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):
Fix Released
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
References