class decorator isn't enabled in nova for some service
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
Medium
|
Ilya Shakhat | ||
Pike |
Confirmed
|
Medium
|
Unassigned | ||
osprofiler |
Invalid
|
Undecided
|
Unassigned |
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/
-> from nova.cmd.api import main
/opt/
-> from nova import service
/opt/
-> from nova import conductor
/opt/
-> from nova.conductor import api as conductor_api
/opt/
-> from nova.conductor import rpcapi
/opt/
-> class ConductorAPI(
> /opt/stack/
-> if profiler and 'profiler' in CONF and CONF.profiler.
(Pdb) 'profiler' in CONF
True
(Pdb) CONF.profiler.
False
[1]: https:/
[2]: https:/
[3]: https:/
Confirmed, the bug is introduced after switching to uWSGI-based deployment. Besides Nova it affects also Cinder. Keystone, Neutron and Heat are not affected.