From 798f06abb2e5e9831e8bad11ff3258d5b51d1547 Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Wed, 11 Nov 2020 10:50:44 +0100 Subject: [PATCH] Remove [database]connection defaulting The config documentation says that the [database]connection config is defaulted to None but in reality the nova code defaulted it to a local sqlite database. This is clearly wrong as: * Nobody wants to run nova with sqlite outside of a test env * The nova-compute service should never have DB credentials configured So this patch makes sure that nova does not change the default of this config option. Change-Id: I81560b3ba3dbaccdb90b32ed1a3c4ffd8a6283a6 Closes-Bug: #1903824 --- nova/conf/database.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nova/conf/database.py b/nova/conf/database.py index 600b4a5e4ed3..f9d0adddb8e8 100644 --- a/nova/conf/database.py +++ b/nova/conf/database.py @@ -16,9 +16,6 @@ from oslo_config import cfg from oslo_db import options as oslo_db_options -from nova.conf import paths - -_DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('nova.sqlite') _ENRICHED = False @@ -110,7 +107,6 @@ def enrich_help_text(alt_db_opts): def register_opts(conf): - oslo_db_options.set_defaults(conf, connection=_DEFAULT_SQL_CONNECTION) conf.register_opts(api_db_opts, group=api_db_group)