diff --git a/nova/conf/database.py b/nova/conf/database.py index b0d64db356..1096c12a2b 100644 --- a/nova/conf/database.py +++ b/nova/conf/database.py @@ -63,8 +63,9 @@ api_db_opts = [ cfg.StrOpt('mysql_sql_mode', default='TRADITIONAL', help=''), - cfg.IntOpt('idle_timeout', + cfg.IntOpt('connection_recycle_time', default=3600, + deprecated_name='idle_timeout', help=''), # TODO(markus_z): We should probably default this to 5 to not rely on the # SQLAlchemy default. Otherwise we wouldn't provide a stable default. diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 5ed2b98541..deef78a3d1 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -87,7 +87,7 @@ def _get_db_conf(conf_group, connection=None): __autocommit=True, expire_on_commit=False, mysql_sql_mode=conf_group.mysql_sql_mode, - idle_timeout=conf_group.idle_timeout, + connection_recycle_time=conf_group.connection_recycle_time, connection_debug=conf_group.connection_debug, max_pool_size=conf_group.max_pool_size, max_overflow=conf_group.max_overflow, diff --git a/releasenotes/notes/bug-1716786-7c3fc081f29f4dac.yaml b/releasenotes/notes/bug-1716786-7c3fc081f29f4dac.yaml new file mode 100644 index 0000000000..950a55e4f2 --- /dev/null +++ b/releasenotes/notes/bug-1716786-7c3fc081f29f4dac.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``idle_timeout`` option in the ``api_database`` group + has been renamed to ``connection_recycle_time``. \ No newline at end of file