Merge "Prepare for oslo.log 3.17.0"

This commit is contained in:
Jenkins 2016-11-29 23:45:16 +00:00 committed by Gerrit Code Review
commit c40a71e489
7 changed files with 20 additions and 0 deletions

View File

@ -47,6 +47,7 @@ from glance.image_cache import cleaner
CONF = config.CONF CONF = config.CONF
logging.register_options(CONF) logging.register_options(CONF)
CONF.set_default(name='use_stderr', default=True, enforce_type=True)
def main(): def main():

View File

@ -41,6 +41,7 @@ from glance.image_cache import prefetcher
CONF = config.CONF CONF = config.CONF
logging.register_options(CONF) logging.register_options(CONF)
CONF.set_default(name='use_stderr', default=True, enforce_type=True)
def main(): def main():

View File

@ -39,6 +39,7 @@ from glance.image_cache import pruner
CONF = config.CONF CONF = config.CONF
logging.register_options(CONF) logging.register_options(CONF)
CONF.set_default(name='use_stderr', default=True, enforce_type=True)
def main(): def main():

View File

@ -313,6 +313,7 @@ def main():
try: try:
logging.register_options(CONF) logging.register_options(CONF)
CONF.set_default(name='use_stderr', default=True, enforce_type=True)
cfg_files = cfg.find_config_files(project='glance', cfg_files = cfg.find_config_files(project='glance',
prog='glance-registry') prog='glance-registry')
cfg_files.extend(cfg.find_config_files(project='glance', cfg_files.extend(cfg.find_config_files(project='glance',

View File

@ -81,6 +81,7 @@ cli_opts = [
CONF = cfg.CONF CONF = cfg.CONF
CONF.register_cli_opts(cli_opts) CONF.register_cli_opts(cli_opts)
logging.register_options(CONF) logging.register_options(CONF)
CONF.set_default(name='use_stderr', default=True, enforce_type=True)
# If ../glance/__init__.py exists, add ../ to Python search path, so that # If ../glance/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python... # it will override what happens to be installed in /usr/(local/)lib/python...

View File

@ -43,6 +43,7 @@ eventlet.patcher.monkey_patch(all=False, socket=True, time=True, select=True,
CONF = cfg.CONF CONF = cfg.CONF
logging.register_options(CONF) logging.register_options(CONF)
CONF.set_default(name='use_stderr', default=True, enforce_type=True)
def main(): def main():

View File

@ -0,0 +1,14 @@
---
upgrade:
- A recent change to oslo.log (>= 3.17.0) set the default value
of ``[DEFAULT]/use_stderr`` to ``False`` in order to produce
duplication of logs (as reported in bug \#1588051). Since this
would change the current behaviour of certain glance commands
(e.g., glance-replicator, glance-cache-manage, etc.), we chose to
override the default value of ``use_stderr`` to ``True`` in those
commands. We also chose not to override that value in any Glance
service (e.g., glance-api, glance-registry) so that duplicate
logs are not created by those services. Operators that have a
usecase that relies on logs being reported on standard error may
set ``[DEFAULT]/use_stderr = True`` in the appropriate service's
configuration file upon deployment.