Deprecate implicit loading of service_providers from neutron_*.conf

This feature is redundant, since it duplicates oslo.config functionality. If
neutron-server needs to load the configuration option from multiple files, it
should be achieved by passing multiple --config-dir/--config-file CLI
arguments, not by relying on implicit loading for files with names matching the
neutron_*.conf pattern.

The plan is to stop implicit loading in Ocata.

More details:
http://lists.openstack.org/pipermail/openstack-dev/2016-May/096033.html

Related-Bug: #1492069
Related-Bug: #1599936
Change-Id: I743e181532d285303c8d5c2a73f4fd674626b478
This commit is contained in:
Ihar Hrachyshka 2016-07-14 10:39:05 +02:00
parent ed58510023
commit 49d1def762
2 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import os
from neutron_lib import exceptions as n_exc
from oslo_config import cfg
from oslo_log import log as logging
from oslo_log import versionutils
import stevedore
from neutron._i18n import _, _LW
@ -116,6 +117,11 @@ class NeutronModule(object):
# necessary, if modules are loaded on the fly (DevStack may
# be an example)
if not providers:
versionutils.report_deprecated_feature(
LOG,
_LW('Implicit loading of service providers from '
'neutron_*.conf files is deprecated and will be removed '
'in Ocata release.'))
providers = self.ini().service_providers.service_provider
return providers

View File

@ -0,0 +1,7 @@
---
deprecations:
- Neutron controller service currently allows to load ``service_providers``
options from some files that are not passed to it via --config-dir or
--config-dir CLI options. This behaviour is now deprecated and will be
disabled in Ocata. Current users are advised to switch to aforementioned
CLI options.