osprofiler not working, only for cinder

Bug #1796943 reported by Emre Ates
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

I'm using stable/pike and devstack to set up openstack, and I'm not getting any traces from cinder using osprofiler.

The RequestContextSerializer in cinder/rpc.py is trying to find a "trace_info" in context; however there is no such field in context. An example context that I'm getting is here:

{u'domain': None, u'project_domain': None, u'auth_token': None, u'resource_uuid': None, u'read_only': False, u'user_id': None, u'user_identity': u'- - - - -', u'is_admin_project': True, u'tenant': None, u'project_id': None, u'project_name': None, u'global_request_id': None, u'timestamp': u'2018-10-09T17:54:07.580181', u'remote_address': None, u'quota_class': None, u'is_admin': True, u'user': None, u'service_catalog': [], u'read_deleted': u'no', u'show_deleted': False, u'roles': [u'admin'], u'request_id': u'req-1fc58e2e-f089-49ce-86bb-ed42c2534677', u'user_domain': None}

I have osprofiler enabled in /etc/cinder/cinder.conf, and I'm getting spans from other services such as nova or neutron. The commands I'm using to test this are "openstack volume list" and "openstack server create".

Tags: osprofiler rpc
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

OSProfiler is disabled by default with Cinder. Make sure you have the section:

[osprofiler]
enabled = True

in cinder.conf and that it is listed in api-paste.ini so it is loaded.

Revision history for this message
Emre Ates (emreates) wrote :

Yes, I have them enabled. Here's the related section from /etc/cinder/cinder.conf:

[profiler]
trace_wsgi_transport = True
trace_message_store = True
trace_management_store = True
connection_string = redis://localhost:6379
hmac_keys = MYKEY
trace_sqlalchemy = False
enabled = True

And /etc/cinder/api-paste.ini:

[composite:osapi_volume]
use = call:cinder.api:root_app_factory
/: apiversions
/v1: openstack_volume_api_v1
/v2: openstack_volume_api_v2
/v3: openstack_volume_api_v3

#example, v2 and v1 are similar
[composite:openstack_volume_api_v3]
use = call:cinder.api.middleware.auth:pipeline_factory
noauth = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler noauth apiv3
keystone = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv3
keystone_nolimit = cors http_proxy_to_wsgi request_id faultwrap sizelimit osprofiler authtoken keystonecontext apiv3

[filter:osprofiler]
paste.filter_factory = osprofiler.web:WsgiMiddleware.factory

I've also restarted openstack by "systemctl restart devstack@*" after changing these.

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Hopefully you figured this out, but your section is called [profiler], but the setting to enable this is under [osprofiler].

Changed in cinder:
status: New → Invalid
Revision history for this message
Emre Ates (emreates) wrote :

According to the documentation, the section should be [profiler].

https://docs.openstack.org/cinder/ussuri/configuration/block-storage/samples/cinder.conf.html

That is the same accross other services like nova, keystone.

Changed in cinder:
status: Invalid → New
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.