Error with openstack-dasboard upgrade

Hi
I had an error trying to upgrade horizon from queens to rocky, how can I retriguer it to try to fix it? is it a known bug?

Executed command to upgrade horizon:
juju config openstack-dashboard action-managed-upgrade=True
juju config openstack-dashboard openstack-origin=cloud:bionic-rocky
juju run-action openstack-dashboard/0 --wait pause
juju run-action openstack-dashboard/0 --wait openstack-upgrade

juju charm error:
unit-openstack-dashboard-0:
id: ee408965-6315-4f58-892f-da3946790158
message: do_openstack_upgrade resulted in an unexpected error
results:
outcome: upgrade failed, see traceback.
traceback: |
Traceback (most recent call last):
File “/var/lib/juju/agents/unit-openstack-dashboard-0/charm/charmhelpers/contrib/openstack/utils.py”, line 1244, in do_action_openstack_upgrade
upgrade_callback(configs=configs)
File “/var/lib/juju/agents/unit-openstack-dashboard-0/charm/hooks/horizon_utils.py”, line 349, in do_openstack_upgrade
configs.set_release(openstack_release=new_os_rel)
AttributeError: ‘NoneType’ object has no attribute ‘set_release’
status: failed
timing:
completed: 2019-12-11 11:09:45 +0000 UTC
enqueued: 2019-12-11 10:43:03 +0000 UTC
started: 2019-12-11 10:43:10 +0000 UTC
unit: openstack-dashboard/0

Apache error log:
[Wed Dec 11 13:30:22.102493 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] Error while checking action permissions.
[Wed Dec 11 13:30:22.102512 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] Traceback (most recent call last):
[Wed Dec 11 13:30:22.102519 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] File “/usr/lib/python3/dist-packages/horizon/tables/base.py”, line 1390, in _filter_action
[Wed Dec 11 13:30:22.102525 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] return action._allowed(request, datum) and row_matched
[Wed Dec 11 13:30:22.102531 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] File “/usr/lib/python3/dist-packages/horizon/tables/actions.py”, line 692, in _allowed
[Wed Dec 11 13:30:22.102537 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] return super(BatchAction, self)._allowed(request, datum)
[Wed Dec 11 13:30:22.102542 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] File “/usr/lib/python3/dist-packages/horizon/tables/actions.py”, line 137, in _allowed
[Wed Dec 11 13:30:22.102548 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] return (policy_check(self.policy_rules, request, target) and
[Wed Dec 11 13:30:22.102554 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] File “/usr/lib/python3/dist-packages/openstack_auth/policy.py”, line 155, in check
[Wed Dec 11 13:30:22.102560 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] enforcer = _get_enforcer()
[Wed Dec 11 13:30:22.102566 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] File “/usr/lib/python3/dist-packages/openstack_auth/policy.py”, line 64, in _get_enforcer
[Wed Dec 11 13:30:22.102571 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] if os.path.isfile(enforcer.policy_path):
[Wed Dec 11 13:30:22.102577 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] File “/usr/lib/python3.6/genericpath.py”, line 30, in isfile
[Wed Dec 11 13:30:22.102583 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] st = os.stat(path)
[Wed Dec 11 13:30:22.102598 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886] TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
[Wed Dec 11 13:30:22.102608 2019] [wsgi:error] [pid 1018966:tid 139647227524864] [remote 192.168.7.20:52886]

Hi @endikap100,

Do you know if you were on the latest stable release of the charm prior to issuing the upgrade commands? That is the recommendation.

Given the recent Py2 / Py3 updates everywhere (in distros, in OpenStack upstream, and in the charms), I suspect your error may already be fixed.

To be sure, please provide the charm revision information and/or raise a launchpad bug with details based on guidance in the charm guide.

I upgraded the charms before upgrading openstack, I´m using Rev 297.

I’ve run into this myself, but didn’t dig into it more deeply then, but now that I’ve had a moment, I think I’ve found the issue in the code. I’ve updated the relevant bug.

https://bugs.launchpad.net/charm-openstack-dashboard/+bug/1851943