From deb9ce4ea5407cf1add1651f3ec6b0da6517a609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Thu, 4 Jun 2020 11:38:13 +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: I1f03b27cdbd5b82fa70e3616c95471c8014e8e30 --- zun/api/wsgi.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zun/api/wsgi.py b/zun/api/wsgi.py index 2e5be9d8c..cef09ef37 100644 --- a/zun/api/wsgi.py +++ b/zun/api/wsgi.py @@ -25,6 +25,9 @@ LOG = log.getLogger(__name__) def init_application(): + # NOTE(hberaud): Call reset to ensure the ConfigOpts object doesn't + # already contain registered options if the app is reloaded. + CONF.reset() # Initialize the oslo configuration library and logging service.prepare_service(sys.argv) profiler.setup('zun-api', CONF.host)