← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1732000] Re: nova-api does not log config options when run in wsgi mode

 

Reviewed:  https://review.openstack.org/519462
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=53dc0917c57243ba96845b4ba72f4069ee0d21ac
Submitter: Zuul
Branch:    master

commit 53dc0917c57243ba96845b4ba72f4069ee0d21ac
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date:   Mon Nov 13 14:52:09 2017 -0500

    Log options at debug when starting API services under wsgi
    
    The ServiceLauncher and ProcessLauncher in oslo.service will,
    by default, log config options at DEBUG level at the start
    of a service, which is what would happen when starting nova-api
    using eventlet.
    
    Running nova-api under wsgi has been supported since Pike, but
    the wsgi app code doesn't log the debug options like oslo.service
    would, so this adds that back in.
    
    The placement-api wsgi app code would log the options but based on
    whether or not debug logging is enabled, which is different from how
    it works in oslo.service, so the config option that is checked is
    changed in this patch, and a release note is added for that subtle
    behavior change.
    
    Closes-Bug: #1732000
    
    Change-Id: I680fd9761a049cac619b7793fa5c60e6daf4fa47


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1732000

Title:
  nova-api does not log config options when run in wsgi mode

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) pike series:
  Confirmed

Bug description:
  The ServiceLauncher/ProcessLauncher code in oslo.services will check a
  'log_options' option on start of the service/process and if True (the
  default) it will log the config option values.

  The nova-api service used to run with eventlet only via oslo.service,
  but since Pike we can run nova-api using wsgi (uwsgi, mod_wsgi, etc).
  However, the wsgi app doesn't log the config options.

  Compare to this ocata nova-api log:

  http://logs.openstack.org/59/509659/1/check/legacy-tempest-dsvm-
  neutron-full/d84ca9f/logs/screen-n-api.txt.gz

  To master (queens):

  http://logs.openstack.org/04/514904/20/check/legacy-tempest-dsvm-
  neutron-full/0cd3ce7/logs/screen-n-api.txt.gz

  The placement-api wsgi app does log the options, but uses different
  logic (it doesn't honor the log_options option):

  http://logs.openstack.org/04/514904/20/check/legacy-tempest-dsvm-
  neutron-full/0cd3ce7/logs/screen-placement-
  api.txt.gz#_Nov_10_06_47_27_532714

  https://github.com/openstack/nova/blob/16.0.0/nova/api/openstack/placement/wsgi.py#L59

  So there are two things to fix here:

  1. nova-api should log config options on startup when running under
  wsgi.

  2. placement-api should check the log_options option rather than the
  debug option.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1732000/+subscriptions


References