[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
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard Charm |
Invalid
|
Critical
|
Liam Young | ||
heat-dashboard (Ubuntu) |
Fix Released
|
High
|
James Page |
Bug Description
bundle:
https:/
I am getting "something went wrong" page periodically while using Horizon with Queens:
https:/
[Thu Mar 08 22:16:41.491638 2018] [wsgi:error] [pid 68565:tid 140145296692992] No handlers could be found for logger "neutron_
[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/
...
[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/
[Thu Mar 08 22:16:42.219863 2018] [wsgi:error] [pid 68563:tid 140145296692992] if os.path.
[Thu Mar 08 22:16:42.219877 2018] [wsgi:error] [pid 68563:tid 140145296692992] File "/usr/lib/
[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:/
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@juju-
/usr/lib/
# again, nothing here
root@juju-
cinder_policy.d glance_policy.json keystonev3_
cinder_policy.json keystone_
root@juju-
#POLICY_FILES_PATH = os.path.
# 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.
--
POLICY_FILES = {
'identity': 'keystonev3_
'compute': 'nova_policy.json',
'volume': 'cinder_
'image': 'glance_
'orchestrat
See this asciinema for a live demo
https:/
After heat_policy.json is commented out the exception disappears.
This policy file needs to be present to make sure things work as expected.
Changed in charm-openstack-dashboard: | |
assignee: | nobody → Liam Young (gnuoy) |
Changed in charm-openstack-dashboard: | |
status: | New → Confirmed |
importance: | Undecided → High |
importance: | High → Critical |
milestone: | none → 18.02 |
Changed in charm-openstack-dashboard: | |
milestone: | 18.02 → 18.05 |
Changed in heat-dashboard (Ubuntu): | |
assignee: | nobody → James Page (james-page) |
status: | Triaged → In Progress |
milestone: | none → ubuntu-18.03 |
Heat devs have implemented policy-in-code for Queens:
https:/ /governance. openstack. org/tc/ goals/queens/ policy- in-code. html#heat /blueprints. launchpad. net/heat/ +spec/policy- in-code /review. openstack. org/#/q/ (status: open+OR+ status: merged) +project: openstack/ heat++% 22policy+ in+code% 22
https:/
https:/
However, horizon relies on copies of policy files of individual services: /docs.openstack .org/horizon/ latest/ contributor/ topics/ policy. html#policy- file-maintenanc e
https:/