horizon throws error 500 for missing django module

Bug #1809640 reported by alfred
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Expired
Undecided
Unassigned

Bug Description

I used the rocky branch from git and turned on the dev mode in the all.yml. When I finished the deploy of openstack and tried to get access to the dashboard, the web throws the Error 500 like following:

> Internal Server Error
> The server encountered an internal error or misconfiguration and was unable to complete your request.
> Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
> More information about this error may be available in the server error log.

When I looked into the logs of horizon, it shows following errors:

[Mon Dec 24 14:50:14.689738 2018] [:error] [pid 44] WARNING:root:Use of this 'djano.wsgi' file has been deprecated since the Rocky release in favor of 'wsgi.py' in the 'openstack_dashboard' module. This file is a legacy naming from before Django 1.4 and an importable 'wsgi.py' is now the default. This file will be removed in the T release cycle.
[Mon Dec 24 14:50:14.694576 2018] [:error] [pid 44] [remote 172.29.236.5:68] mod_wsgi (pid=44): Target WSGI script '/var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi' cannot be loaded as Python module.
[Mon Dec 24 14:50:14.694608 2018] [:error] [pid 44] [remote 172.29.236.5:68] mod_wsgi (pid=44): Exception occurred processing WSGI script '/var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi'.
[Mon Dec 24 14:50:14.694644 2018] [:error] [pid 44] [remote 172.29.236.5:68] Traceback (most recent call last):
[Mon Dec 24 14:50:14.694679 2018] [:error] [pid 44] [remote 172.29.236.5:68] File "/var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi", line 40, in <module>
[Mon Dec 24 14:50:14.694751 2018] [:error] [pid 44] [remote 172.29.236.5:68] application = get_wsgi_application()
[Mon Dec 24 14:50:14.694808 2018] [:error] [pid 44] [remote 172.29.236.5:68] File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
[Mon Dec 24 14:50:14.694854 2018] [:error] [pid 44] [remote 172.29.236.5:68] return WSGIHandler()
[Mon Dec 24 14:50:14.694878 2018] [:error] [pid 44] [remote 172.29.236.5:68] File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 151, in __init__
[Mon Dec 24 14:50:14.694918 2018] [:error] [pid 44] [remote 172.29.236.5:68] self.load_middleware()
[Mon Dec 24 14:50:14.694940 2018] [:error] [pid 44] [remote 172.29.236.5:68] File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 80, in load_middleware
[Mon Dec 24 14:50:14.694997 2018] [:error] [pid 44] [remote 172.29.236.5:68] middleware = import_string(middleware_path)
[Mon Dec 24 14:50:14.695027 2018] [:error] [pid 44] [remote 172.29.236.5:68] File "/var/lib/kolla/venv/lib/python2.7/site-packages/django/utils/module_loading.py", line 20, in import_string
[Mon Dec 24 14:50:14.695070 2018] [:error] [pid 44] [remote 172.29.236.5:68] module = import_module(module_path)
[Mon Dec 24 14:50:14.695093 2018] [:error] [pid 44] [remote 172.29.236.5:68] File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
[Mon Dec 24 14:50:14.695132 2018] [:error] [pid 44] [remote 172.29.236.5:68] __import__(name)
[Mon Dec 24 14:50:14.695168 2018] [:error] [pid 44] [remote 172.29.236.5:68] ImportError: No module named middleware

As far as I can see from the log, it probably missed something. But how to fix it?

ps. When I turned off the dev mode, it works fine.

alfred (nankeys)
description: updated
Revision history for this message
Michal Nasiadka (mnasiadka) wrote :

Does this bug still occur with latest code? If yes - please upload new logs (Horizon logs from /var/log/kolla/horizon/* and docker logs horizon)

Changed in kolla:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for kolla because there has been no activity for 60 days.]

Changed in kolla:
status: Incomplete → Expired
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.