Remove deprecated API settings

We moved "bind_host", "bind_port", "auth_strategy", and "api_handler"
into the api_settings section in the configuration file. These settings
have now reached the end of their deprecation cycle and are being removed.

Change-Id: I323a7bdceae5a8d0e3025800beaf1d0a13c12ef8
This commit is contained in:
Michael Johnson 2018-09-07 10:00:43 -07:00
parent feff3b472c
commit e644b9fdce
3 changed files with 29 additions and 48 deletions

View File

@ -204,7 +204,8 @@ function octavia_configure {
setup_logging $OCTAVIA_CONF
# Change bind host
iniset $OCTAVIA_CONF DEFAULT bind_host $SERVICE_HOST
iniset $OCTAVIA_CONF api_settings bind_host $SERVICE_HOST
iniset $OCTAVIA_CONF api_settings api_handler queue_producer
iniset $OCTAVIA_CONF database connection "mysql+pymysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:3306/octavia"
@ -234,8 +235,6 @@ function octavia_configure {
iniset $OCTAVIA_CONF house_keeping amphora_expiry_age ${OCTAVIA_AMP_EXPIRY_AGE}
iniset $OCTAVIA_CONF house_keeping load_balancer_expiry_age ${OCTAVIA_LB_EXPIRY_AGE}
iniset $OCTAVIA_CONF DEFAULT api_handler queue_producer
iniset $OCTAVIA_CONF DEFAULT transport_url $(get_transport_url)
iniset $OCTAVIA_CONF oslo_messaging rpc_thread_pool_size 2
@ -328,13 +327,13 @@ function octavia_configure {
if [ $OCTAVIA_NODE == 'main' ]; then
configure_octavia_api_haproxy
# make sure octavia is reachable from haproxy
iniset $OCTAVIA_CONF DEFAULT bind_port ${OCTAVIA_HA_PORT}
iniset $OCTAVIA_CONF DEFAULT bind_host 0.0.0.0
iniset $OCTAVIA_CONF api_settings bind_port ${OCTAVIA_HA_PORT}
iniset $OCTAVIA_CONF api_settings bind_host 0.0.0.0
fi
if [ $OCTAVIA_NODE != 'main' ] && [ $OCTAVIA_NODE != 'standalone' ] ; then
# make sure octavia is reachable from haproxy from main node
iniset $OCTAVIA_CONF DEFAULT bind_port ${OCTAVIA_HA_PORT}
iniset $OCTAVIA_CONF DEFAULT bind_host 0.0.0.0
iniset $OCTAVIA_CONF api_settings bind_port ${OCTAVIA_HA_PORT}
iniset $OCTAVIA_CONF api_settings bind_host 0.0.0.0
fi
}

View File

@ -32,37 +32,12 @@ from octavia import version
LOG = logging.getLogger(__name__)
# TODO(rm_work) Remove in or after "R" release
API_SETTINGS_DEPRECATION_MESSAGE = _(
'This setting has moved to the [api_settings] section.')
core_opts = [
cfg.HostnameOpt('host', default=utils.get_hostname(),
help=_("The hostname Octavia is running on")),
cfg.StrOpt('octavia_plugins', default='hot_plug_plugin',
help=_("Name of the controller plugin to use")),
# TODO(johnsom) Remove in or after "R" release
cfg.IPOpt('bind_host', help=_("The host IP to bind to"),
deprecated_for_removal=True,
deprecated_reason=API_SETTINGS_DEPRECATION_MESSAGE),
# TODO(johnsom) Remove in or after "R" release
cfg.PortOpt('bind_port', help=_("The port to bind to"),
deprecated_for_removal=True,
deprecated_reason=API_SETTINGS_DEPRECATION_MESSAGE),
# TODO(johnsom) Remove in or after "R" release
cfg.StrOpt('auth_strategy',
choices=[constants.NOAUTH,
constants.KEYSTONE,
constants.TESTING],
help=_("The auth strategy for API requests."),
deprecated_for_removal=True,
deprecated_reason=API_SETTINGS_DEPRECATION_MESSAGE),
# TODO(johnsom) Remove in or after "R" release
cfg.StrOpt('api_handler',
help=_("The handler that the API communicates with"),
deprecated_for_removal=True,
deprecated_reason=API_SETTINGS_DEPRECATION_MESSAGE),
]
api_opts = [
@ -654,22 +629,6 @@ def setup_logging(conf):
# a value set in the previous location while allowing settings that have
# not yet been moved to be utilized.
def handle_deprecation_compatibility():
# TODO(johnsom) Remove in or after "R" release
if cfg.CONF.bind_host is not None:
cfg.CONF.set_default('bind_host', cfg.CONF.bind_host,
group='api_settings')
# TODO(johnsom) Remove in or after "R" release
if cfg.CONF.bind_port is not None:
cfg.CONF.set_default('bind_port', cfg.CONF.bind_port,
group='api_settings')
# TODO(johnsom) Remove in or after "R" release
if cfg.CONF.auth_strategy is not None:
cfg.CONF.set_default('auth_strategy', cfg.CONF.auth_strategy,
group='api_settings')
# TODO(johnsom) Remove in or after "R" release
if cfg.CONF.api_handler is not None:
cfg.CONF.set_default('api_handler', cfg.CONF.api_handler,
group='api_settings')
# TODO(tatsuma) Remove in or after "T" release
if cfg.CONF.health_manager.status_update_threads is not None:
cfg.CONF.set_default('health_update_threads',

View File

@ -0,0 +1,23 @@
---
upgrade:
- |
The following configuration settings have reached the end of their
deprecation period and are now removed from the [default] section of
the configuration. These will only be available in the [api_settings]
section going forward.
* [DEFAULT] bind_host
* [DEFAULT] bind_port
* [DEFAULT] auth_strategy
* [DEFAULT] api_handler
deprecations:
- |
The following configuration settings have reached the end of their
deprecation period and are now removed from the [default] section of
the configuration. These will only be available in the [api_settings]
section going forward.
* [DEFAULT] bind_host
* [DEFAULT] bind_port
* [DEFAULT] auth_strategy
* [DEFAULT] api_handler