wsgi: Always reset conf.CONF when starting the application
This ensures that options loaded during any prior run of the application are dropped before being added again during init_application. Change-Id: I41b5c7990d4d62a3a397f1686261f3fb7dc1a0be Closes-bug: #1784155
This commit is contained in:
parent
8e27880a18
commit
d83b1056b4
|
@ -101,6 +101,11 @@ def _set_middleware_defaults():
|
|||
def init_application():
|
||||
# initialize the config system
|
||||
conffile = _get_config_file()
|
||||
|
||||
# NOTE(lyarwood): Call reset to ensure the ConfigOpts object doesn't
|
||||
# already contain registered options if the app is reloaded.
|
||||
conf.CONF.reset()
|
||||
|
||||
# This will raise cfg.ConfigFilesNotFoundError and cfg.RequiredOptError
|
||||
# when either conffile is not there or some required option is not set
|
||||
# (notably the database connection string). We want both of these to
|
||||
|
|
Loading…
Reference in New Issue