conf: Deprecate AggregateImagePropertiesIsolation opts
The 'AggregateImagePropertiesIsolation' scheduler filter allows users to filter host aggregates by comparing aggregate and image metadata. The '[filter_scheduler] aggregate_image_properties_isolation_namespace' and '[filter_scheduler] aggregate_image_properties_isolation_separator' options purport to allow users to specify a prefix to use for both the aggregate and image metadata keys, allowing users to do e.g.: openstack image set --property customized.os_type=linux $IMAGE openstack aggregate set --property customized.os_type=windows $AGG1 openstack aggregate set --property customized.os_type=linux $AGG2 However, as noted in change If7245a90711bd2ea13095ba26b9bc82ea3e17202, this is no longer possible since we introduced the 'ImageMetaProps' o.vo in Liberty and promptly lost the ability to see any non-o.vo image metadata properties from glance. There's a possibility, however slight, that some people are using namespaces that match actual nova namespaces such as 'hw' and a separator of '_', but those will continue to work just fine. Setting anything else will result in the scheduler filter failing since the image property will always appear to be absent. As a result, these could be outright removed rather than deprecated. We choose to deprecate just so people can see the warnings. Change-Id: Ide763d75e42427a9df3673313895ef47b8727802 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
+14
-3
@@ -844,11 +844,15 @@ Related options:
|
||||
* ``[filter_scheduler] isolated_images``
|
||||
* ``[filter_scheduler] isolated_hosts``
|
||||
"""),
|
||||
# TODO(stephenfin): Consider deprecating these next two options: they're
|
||||
# effectively useless now that we don't support arbitrary image metadata
|
||||
# properties
|
||||
cfg.StrOpt(
|
||||
"aggregate_image_properties_isolation_namespace",
|
||||
deprecated_for_removal=True,
|
||||
deprecated_since="33.0.0",
|
||||
deprecated_reason="""
|
||||
It no longer possible to filter on arbitrary image metadata properties. Support
|
||||
for this was removed in 12.0.0 (Liberty). As a result, this option is no longer
|
||||
useful.
|
||||
""",
|
||||
help="""
|
||||
Image property namespace for use in the host aggregate.
|
||||
|
||||
@@ -873,6 +877,13 @@ Related options:
|
||||
cfg.StrOpt(
|
||||
"aggregate_image_properties_isolation_separator",
|
||||
default=".",
|
||||
deprecated_for_removal=True,
|
||||
deprecated_since="33.0.0",
|
||||
deprecated_reason="""
|
||||
It no longer possible to filter on arbitrary image metadata properties. Support
|
||||
for this was removed in 12.0.0 (Liberty). As a result, this option is no longer
|
||||
useful.
|
||||
""",
|
||||
help="""
|
||||
Separator character(s) for image property namespace and name.
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
from oslo_log import log as logging
|
||||
|
||||
|
||||
import nova.conf
|
||||
from nova.scheduler import filters
|
||||
from nova.scheduler.filters import utils
|
||||
@@ -42,6 +41,18 @@ class AggregateImagePropertiesIsolation(filters.BaseHostFilter):
|
||||
cfg_separator = (CONF.filter_scheduler.
|
||||
aggregate_image_properties_isolation_separator)
|
||||
|
||||
if cfg_namespace:
|
||||
LOG.warning(
|
||||
"It is no longer possible to filter on arbitrary image "
|
||||
"metadata properties, which includes standard properties "
|
||||
"prefixed with '[filter_scheduler] "
|
||||
"aggregate_image_properties_isolation_namespace'. "
|
||||
"You should unset this option and consider using the isolated "
|
||||
"aggregate filtering feature instead. "
|
||||
"See '[scheduler] enable_isolated_aggregate_filtering' for "
|
||||
"more information."
|
||||
)
|
||||
|
||||
image_props = spec_obj.image.properties if spec_obj.image else {}
|
||||
metadata = utils.aggregate_metadata_get_by_host(host_state)
|
||||
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``[filter_scheduler] aggregate_image_properties_isolation_namespace``
|
||||
and ``[filter_scheduler] aggregate_image_properties_isolation_separator``
|
||||
config options have been deprecated for removal. These have been
|
||||
effectively unusable since the 12.0.0 (Liberty) release, which removed the
|
||||
ability for the ``AggregateImagePropertiesIsolation`` scheduler filter to
|
||||
filter on any non-standard image metadata property. Users who require this
|
||||
functionality should consider enforcing `aggregate isolation using
|
||||
placement traits`__.
|
||||
|
||||
__ https://docs.openstack.org/nova/latest/reference/isolate-aggregates.html
|
||||
Reference in New Issue
Block a user