diff options
author | Gary Kotton <gkotton@redhat.com> | 2013-06-22 07:14:09 +0000 |
---|---|---|
committer | Gary Kotton <gkotton@redhat.com> | 2013-06-22 07:14:09 +0000 |
commit | 489e2b73f33d40ad34492fa7993f91bc52a8a66e (patch) | |
tree | 5a5a430240a85e988d85a47ea3656131b33f1c13 /openstack | |
parent | ba32f8ecb33403885ea521e3c2dcc4b49a81bd71 (diff) | |
download | oslo-489e2b73f33d40ad34492fa7993f91bc52a8a66e.tar.gz oslo-489e2b73f33d40ad34492fa7993f91bc52a8a66e.tar.xz oslo-489e2b73f33d40ad34492fa7993f91bc52a8a66e.zip |
Ensure that DB configuration is backward compatible
Fixes bug 1193557
Change-Id: I483099b205c71d66cf97522307d8265abe83a488
Diffstat (limited to 'openstack')
-rw-r--r-- | openstack/common/db/sqlalchemy/session.py | 17 |
1 files changed, 17 insertions, 0 deletions
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 |