From 489e2b73f33d40ad34492fa7993f91bc52a8a66e Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sat, 22 Jun 2013 07:14:09 +0000 Subject: Ensure that DB configuration is backward compatible Fixes bug 1193557 Change-Id: I483099b205c71d66cf97522307d8265abe83a488 --- openstack/common/db/sqlalchemy/session.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'openstack') diff --git a/openstack/common/db/sqlalchemy/session.py b/openstack/common/db/sqlalchemy/session.py index b5e10f1..0951ee6 100644 --- a/openstack/common/db/sqlalchemy/session.py +++ b/openstack/common/db/sqlalchemy/session.py @@ -280,6 +280,8 @@ database_opts = [ 'database', deprecated_name='sql_connection', deprecated_group=DEFAULT, + deprecated_opts=[cfg.DeprecatedOpt('sql_connection', + group='DATABASE')], secret=True), cfg.StrOpt('slave_connection', default='', @@ -290,34 +292,46 @@ database_opts = [ default=3600, deprecated_name='sql_idle_timeout', deprecated_group=DEFAULT, + deprecated_opts=[cfg.DeprecatedOpt('sql_idle_timeout', + group='DATABASE')], help='timeout before idle sql connections are reaped'), cfg.IntOpt('min_pool_size', default=1, deprecated_name='sql_min_pool_size', deprecated_group=DEFAULT, + deprecated_opts=[cfg.DeprecatedOpt('sql_min_pool_size', + group='DATABASE')], help='Minimum number of SQL connections to keep open in a ' 'pool'), cfg.IntOpt('max_pool_size', default=None, deprecated_name='sql_max_pool_size', deprecated_group=DEFAULT, + deprecated_opts=[cfg.DeprecatedOpt('sql_max_pool_size', + group='DATABASE')], help='Maximum number of SQL connections to keep open in a ' 'pool'), cfg.IntOpt('max_retries', default=10, deprecated_name='sql_max_retries', deprecated_group=DEFAULT, + deprecated_opts=[cfg.DeprecatedOpt('sql_max_retries', + group='DATABASE')], help='maximum db connection retries during startup. ' '(setting -1 implies an infinite retry count)'), cfg.IntOpt('retry_interval', default=10, deprecated_name='sql_retry_interval', deprecated_group=DEFAULT, + deprecated_opts=[cfg.DeprecatedOpt('reconnect_interval', + group='DATABASE')], help='interval between retries of opening a sql connection'), cfg.IntOpt('max_overflow', default=None, deprecated_name='sql_max_overflow', deprecated_group=DEFAULT, + deprecated_opts=[cfg.DeprecatedOpt('sqlalchemy_max_overflow', + group='DATABASE')], help='If set, use this value for max_overflow with sqlalchemy'), cfg.IntOpt('connection_debug', default=0, @@ -332,12 +346,15 @@ database_opts = [ help='Add python stack traces to SQL as comment strings'), cfg.IntOpt('pool_timeout', default=None, + deprecated_name='sqlalchemy_pool_timeout', + deprecated_group='DATABASE', help='If set, use this value for pool_timeout with sqlalchemy'), ] CONF = cfg.CONF CONF.register_opts(sqlite_db_opts) CONF.register_opts(database_opts, 'database') + LOG = logging.getLogger(__name__) _ENGINE = None -- cgit