From 601ea27693e5e4f450f38de4ef32fb444aa30f5a Mon Sep 17 00:00:00 2001 From: chenxing Date: Thu, 21 Jun 2018 10:36:27 +0800 Subject: [PATCH] Fix the duplicated config options of api_database and placement_database The "api_database" and "placement_database" config options have their help text duplicated in the configuration reference: https://docs.openstack.org/nova/latest/configuration/config.html#api-database https://docs.openstack.org/nova/latest/configuration/config.html#placement-database Co-Authored-By: Eric Fried Change-Id: I6a20c13d570b58f2467ad0e7ba595f199e7c7c41 Closes-Bug: #1774754 --- nova/conf/database.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nova/conf/database.py b/nova/conf/database.py index 0b6164946..9355becc8 100644 --- a/nova/conf/database.py +++ b/nova/conf/database.py @@ -19,6 +19,7 @@ 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 # NOTE(markus_z): We cannot simply do: @@ -169,8 +170,11 @@ def list_opts(): # As I think it is useful to have the "oslo.db" namespace information # in the "sample.conf" file, I omit the listing of the "oslo_db_options" # here. - enrich_help_text(api_db_opts) - enrich_help_text(placement_db_opts) + global _ENRICHED + if not _ENRICHED: + enrich_help_text(api_db_opts) + enrich_help_text(placement_db_opts) + _ENRICHED = True return { api_db_group: api_db_opts, placement_db_group: placement_db_opts,