OpenStack Ansible dashboard not able to log in with admin credentials

Bug #1802132 reported by Umair Nadeem
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Unassigned

Bug Description

Problem Description:
After deploying OSA on a single node, when I log in to Horizon dashboard with admin credentials, I get the following error:

You do not have permission to access the resource: /project/
Login as different user or go back to home page

However, after attempting to log in one more time, I get the following error in my browser:

Environment:

Request Method: GET
Request URL: https://10.100.1.111/project/

Django Version: 1.11.14
Python Version: 2.7.15
Installed Applications:
['openstack_dashboard.dashboards.project',
 'heat_dashboard',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.identity',
 'openstack_dashboard.dashboards.settings',
 'openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django_pyscss',
 'openstack_dashboard.django_pyscss_fix',
 'compressor',
 'horizon',
 'openstack_auth']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'horizon.middleware.OperationLogMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'horizon.themes.ThemeMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'openstack_dashboard.contrib.developer.profiler.middleware.ProfilerClientMiddleware',
 'openstack_dashboard.contrib.developer.profiler.middleware.ProfilerMiddleware')

Template error:
In template /openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/templates/horizon/common/_sidebar.html, error at line 4
   coercing to Unicode: need string or buffer, NoneType found 1 : {% load branding horizon i18n %}
   2 :
   3 : <nav id='sidebar'>
   4 : {% horizon_nav %}
   5 : </nav>
   6 :

Traceback:

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
  41. response = get_response(request)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  217. response = self.process_exception_by_middleware(e, request)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  215. response = response.render()

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/response.py" in render
  107. self.content = self.rendered_content

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  84. content = template.render(context, self._request)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/backends/django.py" in render
  66. return self.template.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render
  207. return self._render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in _render
  199. return self.nodelist.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render
  990. bit = node.render_annotated(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957. return self.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  177. return compiled_parent._render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in _render
  199. return self.nodelist.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render
  990. bit = node.render_annotated(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957. return self.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  72. result = block.nodelist.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render
  990. bit = node.render_annotated(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957. return self.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  72. result = block.nodelist.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render
  990. bit = node.render_annotated(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957. return self.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  216. return template.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render
  209. return self._render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in _render
  199. return self.nodelist.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render
  990. bit = node.render_annotated(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py" in render_annotated
  957. return self.render(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/library.py" in render
  225. _dict = self.func(*resolved_args, **resolved_kwargs)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/templatetags/horizon.py" in horizon_nav
  74. panel.can_access(context)):

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/base.py" in can_access
  149. return self.allowed(context)

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/base.py" in allowed
  158. return self._can_access(context['request'])

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/base.py" in _can_access
  170. if policy_check(rule_param, request):

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/openstack_auth/policy.py" in check
  148. enforcer = _get_enforcer()

File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/openstack_auth/policy.py" in _get_enforcer
  57. if os.path.isfile(enforcer.policy_path):

File "/usr/lib/python2.7/genericpath.py" in isfile
  37. st = os.stat(path)

Exception Type: TypeError at /project/
Exception Value: coercing to Unicode: need string or buffer, NoneType found

At the same time, /var/log/horizon/horizon-error.log reports:

[Wed Nov 07 15:05:03.981014 2018] [wsgi:info] [pid 29639:tid 139700208445184] [remote 172.29.236.11:24196] mod_wsgi (pid=29640, process='horizon', application=''): Loading WSGI script '/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/dist-packages/openstack_dashboard/wsgi/django.wsgi'.

[Wed Nov 07 15:05:04.633442 2018] [wsgi:error] [pid 29639:tid 139700208445184] WARNING:root:Skipping openstack_dashboard.local.enabled._1699_orchestration_settings because it doesn't have DASHBOARD, PANEL, PANEL_GROUP, or FEATURE defined.

[Wed Nov 07 15:05:04.855255 2018] [wsgi:error] [pid 29639:tid 139700082554624] Internal Server Error: /project/

[...followed by the same error shown by the browser (shown above) until...]
[TypeError: coercing to Unicode: need string or buffer, NoneType found]
[and then followed by]

[Wed Nov 07 15:05:05.744533 2018] [wsgi:error] [pid 29645:tid 139700082554624] Not Found: /favicon.ico

However, this file 'favicon.ico' is where it needs to be, i.e., at the following locations in the horizon container:

/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/static/dashboard/img/favicon.ico
/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/static/dashboard/project/heat_dashboard/img/favicon.ico
/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/openstack_dashboard/static/dashboard/img/favicon.ico
/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/heat_dashboard/static/dashboard/project/heat_dashboard/img/favicon.ico

It seems to me that the admin does not have permission to access the resources?

The admin credentials are correct and the role assignments of projects and domains are default (default by OSA depoloyment).

I have tried to re-run the keystone and horizon setup playbooks but the error persists.

I have also created another user account with a separate project and role. The error still persists.

**********************************
************* Update *************
**********************************

This error is not just related to favicon.ico. After turning on Django debugging and logging the actual request made to the WSGI server, I found that this happens with other urls as well.

When the url is 'https://10.100.1.111/project/instances/', horizon-error.log reports:

[Tue Nov 27 13:40:53.325259 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] Internal Server Error: /project/instances/
[Tue Nov 27 13:40:53.325285 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] Traceback (most recent call last):
[Tue Nov 27 13:40:53.325289 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/core/handlers/exception.$
[Tue Nov 27 13:40:53.325292 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] response = get_response(request)
[Tue Nov 27 13:40:53.325296 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/core/handlers/base.py", $
[Tue Nov 27 13:40:53.325299 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] response = self.process_exception_by_middleware(e, request)
[Tue Nov 27 13:40:53.325302 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/core/handlers/base.py", $
[Tue Nov 27 13:40:53.325305 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] response = response.render()
[Tue Nov 27 13:40:53.325308 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/response.py", l$
[Tue Nov 27 13:40:53.325310 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] self.content = self.rendered_content
[Tue Nov 27 13:40:53.325313 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/response.py", l$
[Tue Nov 27 13:40:53.325316 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] content = template.render(context, self._request)
[Tue Nov 27 13:40:53.325319 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/backends/django$
[Tue Nov 27 13:40:53.325322 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.template.render(context)
[Tue Nov 27 13:40:53.325325 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325328 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self._render(context)
[Tue Nov 27 13:40:53.325330 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325333 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.nodelist.render(context)
[Tue Nov 27 13:40:53.325336 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325348 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] bit = node.render_annotated(context)
[Tue Nov 27 13:40:53.325351 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325354 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.render(context)
[Tue Nov 27 13:40:53.325356 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/loader_tags.py"$
[Tue Nov 27 13:40:53.325359 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return compiled_parent._render(context)
[Tue Nov 27 13:40:53.325362 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325365 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.nodelist.render(context)
[Tue Nov 27 13:40:53.325368 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325371 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] bit = node.render_annotated(context)
[Tue Nov 27 13:40:53.325374 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325377 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.render(context)
[Tue Nov 27 13:40:53.325379 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/loader_tags.py"$
[Tue Nov 27 13:40:53.325382 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] result = block.nodelist.render(context)
[Tue Nov 27 13:40:53.325385 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325388 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] bit = node.render_annotated(context)
[Tue Nov 27 13:40:53.325391 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325393 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.render(context)
[Tue Nov 27 13:40:53.325396 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/loader_tags.py"$
[Tue Nov 27 13:40:53.325399 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] result = block.nodelist.render(context)
[Tue Nov 27 13:40:53.325402 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325405 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] bit = node.render_annotated(context)
[Tue Nov 27 13:40:53.325408 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325413 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.render(context)
[Tue Nov 27 13:40:53.325416 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/loader_tags.py"$
[Tue Nov 27 13:40:53.325419 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return template.render(context)
[Tue Nov 27 13:40:53.325421 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325424 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self._render(context)
[Tue Nov 27 13:40:53.325427 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325430 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.nodelist.render(context)
[Tue Nov 27 13:40:53.325433 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325436 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] bit = node.render_annotated(context)
[Tue Nov 27 13:40:53.325438 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/base.py", line $
[Tue Nov 27 13:40:53.325441 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.render(context)
[Tue Nov 27 13:40:53.325444 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/django/template/library.py", li$
[Tue Nov 27 13:40:53.325447 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] _dict = self.func(*resolved_args, **resolved_kwargs)
[Tue Nov 27 13:40:53.325450 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/templatetags/horizon.py$
[Tue Nov 27 13:40:53.325453 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] panel.can_access(context)):
[Tue Nov 27 13:40:53.325455 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/base.py", line 149, in $
[Tue Nov 27 13:40:53.325458 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self.allowed(context)
[Tue Nov 27 13:40:53.325461 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/base.py", line 158, in $
[Tue Nov 27 13:40:53.325464 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] return self._can_access(context['request'])
[Tue Nov 27 13:40:53.325467 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/horizon/base.py", line 170, in $
[Tue Nov 27 13:40:53.325470 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] if policy_check(rule_param, request):
[Tue Nov 27 13:40:53.325476 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/openstack_auth/policy.py", line$
[Tue Nov 27 13:40:53.325479 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] enforcer = _get_enforcer()
[Tue Nov 27 13:40:53.325482 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/openstack/venvs/horizon-19.0.0.0b1/lib/python2.7/site-packages/openstack_auth/policy.py", line$
[Tue Nov 27 13:40:53.325485 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] if os.path.isfile(enforcer.policy_path):
[Tue Nov 27 13:40:53.325488 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] File "/usr/lib/python2.7/genericpath.py", line 37, in isfile
[Tue Nov 27 13:40:53.325490 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] st = os.stat(path)
[Tue Nov 27 13:40:53.325493 2018] [wsgi:error] [pid 15733:tid 140546953955072] [remote 172.29.236.11:59448] TypeError: coercing to Unicode: need string or buffer, NoneType found

**********************************
************ Update 2 ************
**********************************

If I refresh the error page (https://10.100.1.111/project/) several times, it finally works! I receive the actall dashboard page and no error is logged in horizon-error.log.

Here's a screenshot:
https://pasteboard.co/HPgasJn.png

The error comes up for the first visit to each new URL, and if I refresh it a few times, I receive the actual page. For example, when I selected the Flavors tab under Admin, the url became https://10.100.1.111/admin/flavors/ and I received the same error page with title 'TypeError at /admin/flavors'. I refreshed the page several times and now it's working. (https://pasteboard.co/HPgdOgG.png)

The pages work even after I logout and then log in again. If I restart the horizon with:

service apache2 restart

then it starts all over again and I keep receiving this error until I refresh the page a couple of times (roughly 7-12).

All of this is very strange to me tbh.

Additional info:
OS = Ubuntu 18.04.1 LTS
python version = 2.7.15

-----------------------------------
Release: on 2018-11-01 10:24
SHA: fa2497ff3faac344d9c626bb264637a9c1e6a17b
Source: https://git.openstack.org/cgit/openstack/openstack-ansible/tree/deploy-guide/source/index.rst
URL: https://docs.openstack.org/project-deploy-guide/openstack-ansible/rocky/

Umair Nadeem (umair47)
description: updated
description: updated
description: updated
Umair Nadeem (umair47)
description: updated
Revision history for this message
Mohammed Naser (mnaser) wrote :

Can you please try running this again?

openstack-ansible os-horizon-install.yml

Revision history for this message
Umair Nadeem (umair47) wrote :

I have tried this. In fact, I have gone as far as destroying all containers using 'lxc-destroy' and setting everything up from scratch with

openstack-ansible setup-everything.yml

But the result is same. I still get the same error.

I have been stuck on this error for two weeks now.

Umair Nadeem (umair47)
description: updated
Umair Nadeem (umair47)
description: updated
Revision history for this message
Mohammed Naser (mnaser) wrote :

Can you please share your user_varibles.yml and openstack_user_config.yml file?

Revision history for this message
Umair Nadeem (umair47) wrote :

Thank you very much for your email. My openstack_user_config.yml is as below. Right now, it's all in one setup. Later, we plan to add extra node and deploy it as a separate compute node.

**************** openstack_user_config.yml ***********************

---
cidr_networks:
  container: 172.29.236.0/22
  tunnel: 172.29.240.0/22

used_ips:
  - 172.29.236.1
  - "172.29.236.11,172.29.236.12"
  - "172.29.240.11,172.29.240.12"

global_overrides:
  external_lb_vip_address: 10.100.1.111
  internal_lb_vip_address: 172.29.236.11
  management_bridge: "br-mgmt"
  provider_networks:
    - network:
        container_bridge: "br-mgmt"
        container_type: "veth"
        container_interface: "eth1"
        ip_from_q: "container"
        type: "raw"
        group_binds:
          - all_containers
          - hosts
        is_container_address: true
    - network:
        container_bridge: "br-vxlan"
        container_type: "veth"
        container_interface: "eth10"
        ip_from_q: "tunnel"
        type: "vxlan"
        range: "1:1000"
        net_name: "vxlan"
        group_binds:
          - neutron_linuxbridge_agent

###
### Infrastructure
###

# galera, memcache, rabbitmq, utility
shared-infra_hosts:
  infra1:
    ip: 10.100.1.111

# repository (apt cache, python packages, etc)
repo-infra_hosts:
  infra1:
    ip: 10.100.1.111

# load balancer
haproxy_hosts:
  infra1:
    ip: 10.100.1.111

###
### OpenStack
###

# keystone
identity_hosts:
  infra1:
    ip: 10.100.1.111

# cinder api services
storage-infra_hosts:
  infra1:
    ip: 10.100.1.111

# glance
image_hosts:
  infra1:
    ip: 10.100.1.111

# nova api, conductor, etc services
compute-infra_hosts:
  infra1:
    ip: 10.100.1.111

# heat
orchestration_hosts:
  infra1:
    ip: 10.100.1.111

# horizon
dashboard_hosts:
  infra1:
    ip: 10.100.1.111

# neutron server, agents (L3, etc)
network_hosts:
  infra1:
    ip: 10.100.1.111

# nova hypervisors
compute_hosts:
  infra1:
    ip: 10.100.1.111

Here's my /etc/network/interfaces file

**************** /etc/network/interfaces ***********************

# The loopback network interface
auto lo
iface lo inet loopback

# Physical interface
auto eno1
iface eno1 inet static
    address 10.100.1.111
    netmask 255.255.255.0
    gateway 10.100.1.1
    dns-nameservers 10.100.0.1

# Container/Host management VLAN interface
auto eno1.10
iface eno1.10 inet manual
    vlan-raw-device eno1

# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
auto eno1.30
iface eno1.30 inet manual
    vlan-raw-device eno1

# Container/Host management bridge
auto br-mgmt
iface br-mgmt inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports eno1.10
    address 172.29.236.11
    netmask 255.255.252.0
    dns-nameservers 10.100.0.1

# OpenStack Networking VXLAN (tunnel/overlay) bridge
#
# The COMPUTE, NETWORK and INFRA nodes must have an IP address
# on this bridge.
#
auto br-vxlan
iface br-vxlan inet static
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports eno1.30
    address 172.29.240.11
    netmask 255.255.252.0

"10.100.1.111" is the physical IP of the server interface eno1.

Umair Nadeem (umair47)
description: updated
Revision history for this message
Andrew Bonney (andrewbonney) wrote :

This appears to be an old bug report and is known working today. Please re-comment if an issue remains.

Changed in openstack-ansible:
status: New → Fix Released
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.