From 8db8fb30f5757c46a953962d8c2133743cfffdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Thu, 4 Jun 2020 11:35:35 +0200 Subject: [PATCH] Always reset CONF when starting the wsgi app This ensures that options loaded during any prior run of the application are dropped before being added again during init_application. Change-Id: I7e4f230b5e824d4aa072a2a18d0989e670eda77a --- tricircle/api/wsgi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tricircle/api/wsgi.py b/tricircle/api/wsgi.py index 112ff782..f82c3aff 100644 --- a/tricircle/api/wsgi.py +++ b/tricircle/api/wsgi.py @@ -47,6 +47,9 @@ def init_application(): # initialize the config system conf_file = _get_config_file() + # NOTE(hberaud): Call reset to ensure the ConfigOpts object doesn't + # already contain registered options if the app is reloaded. + CONF.reset() config.init(app.common_opts, ['--config-file', conf_file]) LOG.info("Configuration:")