feature: allow to add additional regions outside of the same Juju model/controller

Bug #1714926 reported by Nobuto Murata
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard Charm
Fix Committed
Wishlist
Unassigned

Bug Description

Horizon can handle multiple regions by adding AVAILABLE_REGIONS in local_settings.py. And the charm has ability to add regions through relation data.

However, if two keystones are on a separate Juju controller (it's typical in geographically separated multi-region story), we cannot add regions each other. It would be nice if the charm accepts additional region info from outside of the same Juju model/controller.

[templates/ocata/local_settings.py]
# For multiple regions uncomment this configuration, and add (endpoint, title).
#AVAILABLE_REGIONS = [
# ('http://cluster1.example.com:5000/v2.0', 'cluster1'),
# ('http://cluster2.example.com:5000/v2.0', 'cluster2'),
#]
{% if regions|length > 1 -%}
AVAILABLE_REGIONS = [
{% for region in regions -%}
    ('{{ region.endpoint }}', '{{ region.title }}'),
{% endfor -%}
]
{% endif -%}

OPENSTACK_HOST = "{{ service_host }}"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "{{ default_role }}"
{% if api_version == "3" -%}
OPENSTACK_KEYSTONE_URL = "{{ service_protocol }}://%s:{{ service_port }}/v3" % OPENSTACK_HOST
OPENSTACK_API_VERSIONS = { "identity": 3, }
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "{{ admin_domain_id }}"
{% else -%}
OPENSTACK_KEYSTONE_URL = "{{ service_protocol }}://%s:{{ service_port }}/v2.0" % OPENSTACK_HOST
{% endif -%}

James Hebden (ec0)
tags: added: canonical-bootstack
Revision history for this message
Frode Nordahl (fnordahl) wrote :

Thank you for your bug report.

In the long term I believe some modeling from the Juju side is required to solve this properly.

Support for cross-model (and indeed cross-controller) relationships is under development and indeed available for testing if you live on the bleeding edge. Have a look here: https://insights.ubuntu.com/2017/07/20/testing-the-future-of-juju-with-snaps/

As some time will pass before this feature is readily available in stable environments and charms pick up support, could you share your sense of need and urgency for an eventual interim solution through charm configuration?

Changed in charm-openstack-dashboard:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Vern Hart (vern) wrote :

We're trying to consolidate horizon and other services into a separate model and we need cross model relations to work.

Unfortunately, as Nobuto explains, AVAILABLE_REGIONS doesn't get populated.

We were able to kludge a fix by hard-coding the AVAILABLE_REGIONS in the local_settings.py template but this is a stop-gap at best.

Is the issue that cross-model relations are handled differently than regular relations, from the charm's perspective?

Vern Hart (vern)
tags: added: cpe-onsite
Changed in charm-openstack-dashboard:
status: Triaged → In Progress
Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-openstack-dashboard (master)

Reviewed: https://review.opendev.org/c/openstack/charm-openstack-dashboard/+/898274
Committed: https://opendev.org/openstack/charm-openstack-dashboard/commit/422611f0346e54fc15e8bb8ccedb158835cc999e
Submitter: "Zuul (22348)"
Branch: master

commit 422611f0346e54fc15e8bb8ccedb158835cc999e
Author: Samuel Allan <email address hidden>
Date: Thu Mar 21 10:49:41 2024 +1030

    Add config for extra regions

    This is so we can register extra region endpoints in horizon,
    in situations where the keystone for the extra regions cannot be
    integrated via juju (for example, completely separate deployment).

    Closes-Bug: #1714926

    Change-Id: I52cecec88437fd2bc5a012653f24471039e6b819

Changed in charm-openstack-dashboard:
status: In Progress → Fix Committed
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.