I’m running an experiment where I’m trying to make use of two openstack regions (edge computing scenario) one in Virginia (VA) and on in North Carolina (NC).
I’m finding the log in to the dashboard is failing because of this error.
[Sat Apr 17 21:07:41.454116 2021] [wsgi:error] [pid 407438:tid 140106969708288] [remote 192.168.125.140:49950] The OPENSTACK_KEYSTONE_URL setting points to a v2.0 Keystone endpoint, but v3 is specified as the API version to use by Horizon. Using v3 endpoint for authentication.
[Sat Apr 17 21:07:41.535440 2021] [wsgi:error] [pid 407438:tid 140106969708288] [remote 192.168.125.140:49950] Login failed for user "admin" using domain "admin_domain", remote address 192.168.125.140.
I looked at the settings in /etc/openstack-dashboard/local_settings.py on all of the dashboard hosts and I see that the charm has built the config like this:
Disclaimer: I’m not a programmer I couldn’t python myself out of a wet paper bag if I tried, but here’s what I’ve got so far.
It appears that horizon_contexts.py “update(s) the service endpoint and title for each available region in order to support multi-region deployments” with a hardcoded v2.0 Keystone endpoint ( lines 175 -> 196 )
As a test I’ve cloned the openstack-dashboard repo to a local directory and made these local comments and changes:
if region is not None:
if config("use-internal-endpoints") and internal_host:
endpoint = ("%(internal_protocol)s://%(internal_host)s"
#":%(internal_port)s/v2.0") % local_ctxt
":%(internal_port)s/v3") % local_ctxt
else:
endpoint = ("%(service_protocol)s://%(service_host)s"
#":%(service_port)s/v2.0") % local_ctxt
":%(service_port)s/v3") % local_ctxt
It definitely looks like you should raise a bug (although I happily will if you’d rather, considering how much effort you’ve put in already!). The fix looks generally good, except that it probably does need to support both v2 and v3 endpoints, depending on the OpenStack version.