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

Bug #1732000 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chris Dent
Pike
Confirmed
Undecided
Unassigned

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.

Tags: api placement
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/519462

Changed in nova:
status: Triaged → In Progress
Changed in nova:
assignee: Matt Riedemann (mriedem) → Chris Dent (cdent)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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 <email address hidden>
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0rc1

This issue was fixed in the openstack/nova 17.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.