[Openstack] Havana horizon dashboard bug, Django bug or configuration issue?

David Hill david.hill at ubisoft.com
Tue Oct 22 19:01:28 UTC 2013


Hello guys,

                I have an issue with Horizon dashboard following an update from Grizzly to Havana.

In Apache error logs, I have the following:
[Tue Oct 22 18:48:01 2013] [error] DeprecationWarning: Translations in the project directory aren't supported anymore. Use the LOCALE_PATHS setting instead.['horizon.example.com', 'localhost']
[Tue Oct 22 18:48:01 2013] [error] Internal Server Error: /dashboard/admin/
[Tue Oct 22 18:48:01 2013] [error] Traceback (most recent call last):
[Tue Oct 22 18:48:01 2013] [error]   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 89, in get_response
[Tue Oct 22 18:48:01 2013] [error]     response = middleware_method(request)
[Tue Oct 22 18:48:01 2013] [error]   File "/usr/lib/python2.6/site-packages/django/middleware/common.py", line 55, in process_request
[Tue Oct 22 18:48:01 2013] [error]     host = request.get_host()
[Tue Oct 22 18:48:01 2013] [error]   File "/usr/lib/python2.6/site-packages/django/http/__init__.py", line 224, in get_host
[Tue Oct 22 18:48:01 2013] [error]     "Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): %s" % host)
[Tue Oct 22 18:48:01 2013] [error] SuspiciousOperation: Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): stv-lab-ctrl02.ubisoft.org

And if I comment out that part:
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -214,13 +214,13 @@ class HttpRequest(object):
             server_port = str(self.META['SERVER_PORT'])
             if server_port != (self.is_secure() and '443' or '80'):
                 host = '%s:%s' % (host, server_port)
-
+
         allowed_hosts = ['*'] if settings.DEBUG else settings.ALLOWED_HOSTS
-        if validate_host(host, allowed_hosts):
-            return host
-        else:
-            raise SuspiciousOperation(
-                "Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): %s" % host)
+#        if validate_host(host, allowed_hosts):
+#            return host
+#        else:
+#            raise SuspiciousOperation(
+#                "Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): %s" % host)

     def get_full_path(self):
         # RFC 3986 requires query string arguments to be in the ASCII range.

It seems to be "working" ...   Does anybody encountered this error message or issues with the dashboard following the upgrade from Grizzly to Havana?

Thank you very much,

Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20131022/381b35b8/attachment.html>


More information about the Openstack mailing list