Osprofiler not working with Redis in Horizon

Bug #1811260 reported by Michal Arbet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
osprofiler
Fix Committed
Undecided
Michal Arbet

Bug Description

Hi,

I wanted to have osprofiler support in horizon ( openstack-dashboard ) with redis driver.
I found several issues >>

1. Redis driver not working in osprofiler, incorrect call of base.Driver :

[Thu Jan 10 16:30:01.696258 2019] [wsgi:info] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] mod_wsgi (pid=22113, process='', application='openstack-controller.novalocal|'): Loading WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Thu Jan 10 16:30:05.095478 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] mod_wsgi (pid=22113): Target WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' cannot be loaded as Python module.
[Thu Jan 10 16:30:05.095592 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] mod_wsgi (pid=22113): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Thu Jan 10 16:30:05.098910 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] Traceback (most recent call last):
[Thu Jan 10 16:30:05.098971 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2636, in __getattr__
[Thu Jan 10 16:30:05.098984 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] return self._get(name)
[Thu Jan 10 16:30:05.098999 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 3070, in _get
[Thu Jan 10 16:30:05.099009 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] value, loc = self._do_get(name, group, namespace)
[Thu Jan 10 16:30:05.099022 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 3088, in _do_get
[Thu Jan 10 16:30:05.099030 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] info = self._get_opt_info(name, group)
[Thu Jan 10 16:30:05.099043 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 3264, in _get_opt_info
[Thu Jan 10 16:30:05.099052 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] raise NoSuchOptError(opt_name, group)
[Thu Jan 10 16:30:05.099086 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] oslo_config.cfg.NoSuchOptError: no such option profiler in group [DEFAULT]
[Thu Jan 10 16:30:05.099108 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404]
[Thu Jan 10 16:30:05.099118 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] During handling of the above exception, another exception occurred:
[Thu Jan 10 16:30:05.099124 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404]
[Thu Jan 10 16:30:05.099137 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] Traceback (most recent call last):
[Thu Jan 10 16:30:05.099212 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi", line 42, in <module>
[Thu Jan 10 16:30:05.099224 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] application = get_wsgi_application()
[Thu Jan 10 16:30:05.099238 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/django/core/wsgi.py", line 14, in get_wsgi_application
[Thu Jan 10 16:30:05.099247 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] return WSGIHandler()
[Thu Jan 10 16:30:05.099260 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/django/core/handlers/wsgi.py", line 153, in __init__
[Thu Jan 10 16:30:05.099269 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] self.load_middleware()
[Thu Jan 10 16:30:05.099281 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 82, in load_middleware
[Thu Jan 10 16:30:05.099290 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] mw_instance = middleware(handler)
[Thu Jan 10 16:30:05.099303 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/share/openstack-dashboard/openstack_dashboard/contrib/developer/profiler/middleware.py", line 76, in __init__
[Thu Jan 10 16:30:05.099312 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] api.init_notifier(PROFILER_CONF.get('notifier_connection_string'))
[Thu Jan 10 16:30:05.099324 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/share/openstack-dashboard/openstack_dashboard/contrib/developer/profiler/api.py", line 38, in init_notifier
[Thu Jan 10 16:30:05.099342 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] connection_str, project='horizon', service='horizon', host=host)
[Thu Jan 10 16:30:05.099357 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/osprofiler/notifier.py", line 66, in create
[Thu Jan 10 16:30:05.099366 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] **kwargs).notify
[Thu Jan 10 16:30:05.099378 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/osprofiler/drivers/base.py", line 41, in get_driver
[Thu Jan 10 16:30:05.099387 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] return driver(connection_string, *args, **kwargs)
[Thu Jan 10 16:30:05.099399 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/debtcollector/removals.py", line 261, in wrapper
[Thu Jan 10 16:30:05.099408 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] return f(*args, **kwargs)
[Thu Jan 10 16:30:05.099420 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/osprofiler/drivers/redis_driver.py", line 40, in __init__
[Thu Jan 10 16:30:05.099429 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] service=service, host=host, conf=conf, **kwargs)
[Thu Jan 10 16:30:05.099442 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/osprofiler/drivers/base.py", line 70, in __init__
[Thu Jan 10 16:30:05.099450 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] profiler_config = kwargs.get("conf", {}).get("profiler", {})
[Thu Jan 10 16:30:05.099463 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3.5/_collections_abc.py", line 597, in get
[Thu Jan 10 16:30:05.099471 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] return self[key]
[Thu Jan 10 16:30:05.099484 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2644, in __getitem__
[Thu Jan 10 16:30:05.099492 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] return self.__getattr__(key)
[Thu Jan 10 16:30:05.099505 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2640, in __getattr__
[Thu Jan 10 16:30:05.099513 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] raise NoSuchOptError(name)
[Thu Jan 10 16:30:05.099535 2019] [wsgi:error] [pid 22113:tid 140339045926656] [client 193.86.18.190:47404] oslo_config.cfg.NoSuchOptError: no such option profiler in group [DEFAULT]

2. Horizon UnicodeDecodeError :

UnicodeDecodeError at /auth/login/
'ascii' codec can't decode byte 0xe2 in position 63097: ordinal not in range(128)
Request Method: GET
Request URL: http://openstack-controller/auth/login/?next=/
Django Version: 1.10.7
Exception Type: UnicodeDecodeError
Exception Value:
'ascii' codec can't decode byte 0xe2 in position 63097: ordinal not in range(128)
Exception Location: /usr/lib/python3.5/encodings/ascii.py in decode, line 26
Python Executable: /usr/bin/python3
Python Version: 3.5.3
Python Path:
['/usr/share/openstack-dashboard',
 '/usr/lib/python35.zip',
 '/usr/lib/python3.5',
 '/usr/lib/python3.5/plat-x86_64-linux-gnu',
 '/usr/lib/python3.5/lib-dynload',
 '/usr/local/lib/python3.5/dist-packages',
 '/usr/lib/python3/dist-packages',
 '/usr/share/openstack-dashboard/',
 '/usr/share/openstack-dashboard/openstack_dashboard']
Server time: Thu, 10 Jan 2019 16:38:25 +0000

Error during template rendering
In template /usr/lib/python3/dist-packages/horizon/templates/auth/login.html, error at line 0

Above error is causing three dot in >>

openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html: <p translate>One fine body…</p>
openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html: <p translate>One small body…</p>
openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html: <p translate>One tiny body…</p>
openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html: <p translate>One large body…</p>
openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html: <p translate>One super large body…</p>

3. Horizon missing fields in list_traces function , bad calling engine.list_traces:

-fields = ['base_id', 'timestamp', 'info.request.path']
+fields = ['base_id', 'timestamp', 'info.request.path', 'info']

-traces = engine.list_traces(query, fields)
+traces = engine.list_traces(fields)

4. Horizon python3 binary issue :

TypeError at /project/
b'eyJobWFjX2tleSI6ICJzZWNyZXQiLCAicGFyZW50X2lkIjogIjQ2MzlmNDQzLTk5ODgtNDUwNy1hODkzLWZkZGI2NGU5MGM2YiIsICJiYXNlX2lkIjogImVkYTgyMDFlLWQxYzctNGYyNS04YTQ5LTMxN2QxNGE3ZGNlNSJ9' is not JSON serializable

I will fill also horizon bug and add url to comment.

Revision history for this message
Michal Arbet (michalarbet) wrote :
Changed in osprofiler:
assignee: nobody → Michal Arbet (michalarbet)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to osprofiler (master)

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

Changed in osprofiler:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on osprofiler (master)

Change abandoned by Stephen Finucane (<email address hidden>) on branch: master
Review: https://review.opendev.org/630298

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.