← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1731864] Re: class decorator isn't enabled in nova for some service

 

Patch is here: https://review.openstack.org/#/c/519664/

** Changed in: osprofiler
       Status: Confirmed => In Progress

** Changed in: osprofiler
       Status: In Progress => Invalid

** Also affects: nova
   Importance: Undecided
       Status: New

** Changed in: nova
       Status: New => In Progress

** Changed in: nova
     Assignee: (unassigned) => Ilya Shakhat (shakhat)

** Changed in: nova
   Importance: Undecided => Medium

** Also affects: nova/pike
   Importance: Undecided
       Status: New

** Changed in: nova/pike
       Status: New => Confirmed

** Changed in: nova/pike
   Importance: Undecided => Medium

-- 
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/1731864

Title:
  class decorator isn't enabled in nova for some service

Status in OpenStack Compute (nova):
  In Progress
Status in OpenStack Compute (nova) pike series:
  Confirmed
Status in osprofiler:
  Invalid

Bug description:
  * Observation:

  When using devstack, nova-api rpc calls to the conductor (client side)
  aren't shown in the traces.

  * Personnal Interpretation:

  Nova osprofiler integration makes use of a wrapper around the class
  decorator[1]

  This logic is executed at import time, the issue is that
  `CONF.profiler` options are set at run time when `config_parse` is
  called by the service (e.g in [2][3]).

  In the nova-api case, setting a breakpoint in the wrapper we see that
  the decorator is executed when the `from nova import service` is
  loaded in the api command.

    /usr/local/bin/nova-api(6)<module>()
  -> from nova.cmd.api import main
    /opt/stack/nova/nova/cmd/api.py(33)<module>()
  -> from nova import service
    /opt/stack/nova/nova/service.py(31)<module>()
  -> from nova import conductor
    /opt/stack/nova/nova/conductor/__init__.py(16)<module>()
  -> from nova.conductor import api as conductor_api
    /opt/stack/nova/nova/conductor/api.py(21)<module>()
  -> from nova.conductor import rpcapi
    /opt/stack/nova/nova/conductor/rpcapi.py(34)<module>()
  -> class ConductorAPI(object):
  > /opt/stack/nova/nova/profiler.py(69)decorator()
  -> if profiler and 'profiler' in CONF and CONF.profiler.enabled:

  (Pdb) 'profiler' in CONF
  True
  (Pdb) CONF.profiler.enabled
  False

  
  [1]: https://github.com/openstack/nova/blob/a4fc1bcd08c12324070fde5e500366ff821d468f/nova/profiler.py#L59-L73
  [2]: https://github.com/openstack/nova/blob/a4fc1bcd08c12324070fde5e500366ff821d468f/nova/cmd/api.py#L41
  [3]: https://github.com/openstack/nova/blob/a4fc1bcd08c12324070fde5e500366ff821d468f/nova/config.py#L45-L52

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