diff --git a/nova/conf/scheduler.py b/nova/conf/scheduler.py index f936e8f97b78..a7dcf3f943cf 100644 --- a/nova/conf/scheduler.py +++ b/nova/conf/scheduler.py @@ -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. diff --git a/nova/scheduler/filters/aggregate_image_properties_isolation.py b/nova/scheduler/filters/aggregate_image_properties_isolation.py index 95f22365fb67..8df8e2f5b32b 100644 --- a/nova/scheduler/filters/aggregate_image_properties_isolation.py +++ b/nova/scheduler/filters/aggregate_image_properties_isolation.py @@ -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) diff --git a/releasenotes/notes/deprecated-AggregateImagePropertiesIsolation-conf-opts-ce601f7c08515586.yaml b/releasenotes/notes/deprecated-AggregateImagePropertiesIsolation-conf-opts-ce601f7c08515586.yaml new file mode 100644 index 000000000000..d5085fceb57c --- /dev/null +++ b/releasenotes/notes/deprecated-AggregateImagePropertiesIsolation-conf-opts-ce601f7c08515586.yaml @@ -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