[Bug 1754508] Re: [next][queens] Horizon Errors out on first login or first access to a given dashboard unit: TypeError: coercing to Unicode: need string or buffer, NoneType found
Liam Young
liam.young at canonical.com
Fri Mar 9 09:33:05 UTC 2018
Marking charm bug as invalid inlight of the packaging fix
** Changed in: charm-openstack-dashboard
Status: In Progress => Invalid
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to heat-dashboard in Ubuntu.
https://bugs.launchpad.net/bugs/1754508
Title:
[next][queens] Horizon Errors out on first login or first access to a
given dashboard unit: TypeError: coercing to Unicode: need string or
buffer, NoneType found
Status in OpenStack openstack-dashboard charm:
Invalid
Status in heat-dashboard package in Ubuntu:
Triaged
Bug description:
bundle:
https://paste.ubuntu.com/p/whdWff4KYy/
I am getting "something went wrong" page periodically while using
Horizon with Queens:
https://paste.ubuntu.com/p/B8K8fv24RH/
[Thu Mar 08 22:16:41.491638 2018] [wsgi:error] [pid 68565:tid 140145296692992] No handlers could be found for logger "neutron_lbaas_dashboard.dashboards.project.ngloadbalancersv2.panel"
[Thu Mar 08 22:16:42.219735 2018] [wsgi:error] [pid 68563:tid 140145296692992] Internal Server Error: /identity/
[Thu Mar 08 22:16:42.219772 2018] [wsgi:error] [pid 68563:tid 140145296692992] Traceback (most recent call last):
[Thu Mar 08 22:16:42.219777 2018] [wsgi:error] [pid 68563:tid 140145296692992] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
...
[Thu Mar 08 22:16:42.219855 2018] [wsgi:error] [pid 68563:tid 140145296692992] enforcer = _get_enforcer()
[Thu Mar 08 22:16:42.219859 2018] [wsgi:error] [pid 68563:tid 140145296692992] File "/usr/lib/python2.7/dist-packages/openstack_auth/policy.py", line 64, in _get_enforcer
[Thu Mar 08 22:16:42.219863 2018] [wsgi:error] [pid 68563:tid 140145296692992] if os.path.isfile(enforcer.policy_path):
[Thu Mar 08 22:16:42.219877 2018] [wsgi:error] [pid 68563:tid 140145296692992] File "/usr/lib/python2.7/genericpath.py", line 37, in isfile
[Thu Mar 08 22:16:42.219882 2018] [wsgi:error] [pid 68563:tid 140145296692992] st = os.stat(path)
[Thu Mar 08 22:16:42.219885 2018] [wsgi:error] [pid 68563:tid 140145296692992] TypeError: coercing to Unicode: need string or buffer, NoneType found
It seems painfully similar to this but with a different dashboard plugin: https://bugs.launchpad.net/charm-openstack-dashboard/+bug/1712617
This is reproducible on a fresh installation and after any apache2
restart.
The reason is that heat_policy.json is not present in horizon's conf
directory:
# heat policy is not present in a conf dir
root at juju-98ec86-6-lxd-8:~# locate heat_policy.json
/usr/lib/python2.7/dist-packages/heat_dashboard/conf/heat_policy.json
# again, nothing here
root at juju-98ec86-6-lxd-8:~# ls /usr/share/openstack-dashboard/openstack_dashboard/conf/
cinder_policy.d glance_policy.json keystonev3_policy.json nova_policy.d
cinder_policy.json keystone_policy.json neutron_policy.json nova_policy.json
root at juju-98ec86-6-lxd-8:~# grep -iP -A5 policy_files /etc/openstack-dashboard/local_settings.py
#POLICY_FILES_PATH = os.path.join(ROOT_PATH, "conf")
# Map of local copy of service policy files.
# Please insure that your identity policy file matches the one being used on
# your keystone servers. There is an alternate policy file that may be used
# in the Keystone v3 multi-domain case, policy.v3cloudsample.json.
--
POLICY_FILES = {
'identity': 'keystonev3_policy.json',
'compute': 'nova_policy.json',
'volume': 'cinder_policy.json',
'image': 'glance_policy.json',
'orchestration': 'heat_policy.json', # <--- this is a problem
See this asciinema for a live demo
https://asciinema.org/a/QJwm8xRpULwZgLVx0DN3Vpa0u
After heat_policy.json is commented out the exception disappears.
This policy file needs to be present to make sure things work as
expected.
To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-openstack-dashboard/+bug/1754508/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list