diff --git a/neutron/common/config.py b/neutron/common/config.py index 92b22be4a83..70c2dd7cf18 100644 --- a/neutron/common/config.py +++ b/neutron/common/config.py @@ -22,7 +22,6 @@ import sys from keystoneauth1 import loading as ks_loading from neutron_lib.api import validators from oslo_config import cfg -from oslo_db import options as db_options from oslo_log import log as logging import oslo_messaging from oslo_middleware import cors @@ -52,17 +51,6 @@ common_config.register_core_common_config_opts() oslo_messaging.set_transport_defaults(control_exchange='neutron') -def set_db_defaults(): - # Update the default QueuePool parameters. These can be tweaked by the - # conf variables - max_pool_size, max_overflow and pool_timeout - db_options.set_defaults( - cfg.CONF, - connection='sqlite://', - max_pool_size=10, - max_overflow=20, pool_timeout=10) - -set_db_defaults() - NOVA_CONF_SECTION = 'nova' ks_loading.register_auth_conf_options(cfg.CONF, NOVA_CONF_SECTION) diff --git a/neutron/tests/base.py b/neutron/tests/base.py index 40239e63326..32bddf11dc5 100644 --- a/neutron/tests/base.py +++ b/neutron/tests/base.py @@ -29,6 +29,7 @@ import mock from neutron_lib import fixture from oslo_concurrency.fixture import lockutils from oslo_config import cfg +from oslo_db import options as db_options from oslo_messaging import conffixture as messaging_conffixture from oslo_utils import excutils from oslo_utils import fileutils @@ -145,9 +146,9 @@ class DietTestCase(base.BaseTestCase): super(DietTestCase, self).setUp() # FIXME(amuller): this must be called in the Neutron unit tests base - # class to initialize the DB connection string. Moving this may cause - # non-deterministic failures. Bug #1489098 for more info. - config.set_db_defaults() + # class. Moving this may cause non-deterministic failures. Bug #1489098 + # for more info. + db_options.set_defaults(cfg.CONF, connection='sqlite://') # Configure this first to ensure pm debugging support for setUp() debugger = os.environ.get('OS_POST_MORTEM_DEBUGGER') diff --git a/releasenotes/notes/change-oslo-db-defaults-f94df09c30767f95.yaml b/releasenotes/notes/change-oslo-db-defaults-f94df09c30767f95.yaml new file mode 100644 index 00000000000..bdc25243760 --- /dev/null +++ b/releasenotes/notes/change-oslo-db-defaults-f94df09c30767f95.yaml @@ -0,0 +1,10 @@ +--- +upgrade: + - | + Previously, ``neutron-server`` was using configuration values + for ``oslo.db`` that were different from library defaults. Specifically, it + used the following values when they were not overridden in configuration + files: ``max_pool_size`` = 10, ``max_overflow`` = 20, ``pool_timeout`` = + 10. In this release, ``neutron-server`` instead relies on default values + defined by the library itself. If you rely on old default values, you may + need to adjust your configuration files to explicitly set the new values.