Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndentityServiceContext app data fixes #746

Merged
merged 2 commits into from Nov 3, 2022

Conversation

ajkavanagh
Copy link
Collaborator

The IdentityServiceContext was recently updated to add the application data bag. Unfortunately, they keystone charm uses both the regular relation data primarily, but the updates for endpoints are on both the application database and the regular relation data. The IdentityServiceContext used the app data bag exclusively if there were any keys available, which leads to it ignoring the existing relation data entirely; this results in 'identity relation not ready' with missing data items.

This patch changes the functionality of the IdentityServiceContext so that it preferentially selects keys from the application data bag unless they are None, in which case it tries for those keys on the existing relation data. e.g. it will stitch the two relations together with the app data bag taking priority. This allows the (e.g.) nova-cloud-controller charm to correctly access the identity relation data and form a complete context.

The IdentityServiceContext was recently updated to add the application
data bag.  Unfortunately, they keystone charm uses *both* the regular
relation data primarily, but the updates for endpoints are on both the
application database and the regular relation data.  The
IdentityServiceContext used the app data bag exclusively if there were
any keys available, which leads to it ignoring the existing relation
data entirely; this results in 'identity relation not ready' with
missing data items.

This patch changes the functionality of the IdentityServiceContext so
that it preferentially selects keys from the application data bag
*unless* they are None, in which case it tries for those keys on the
existing relation data.  e.g. it will stitch the two relations together
with the app data bag taking priority.  This allows the (e.g.)
nova-cloud-controller charm to correctly access the identity relation
data and form a complete context.
@javacruft javacruft merged commit b271b85 into juju:master Nov 3, 2022
@ajkavanagh ajkavanagh deleted the bug/fix-app-data-identity-context branch November 3, 2022 15:35
openstack-mirroring pushed a commit to openstack/charm-nova-cloud-controller that referenced this pull request Nov 7, 2022
The IdentityServiceContext was recently updated to add the application
data bag. Unfortunately, they keystone charm uses both the regular
relation data primarily, but the updates for endpoints are on both the
application database and the regular relation data. The
IdentityServiceContext used the app data bag exclusively if there were
any keys available, which leads to it ignoring the existing relation
data entirely; this results in 'identity relation not ready' with
missing data items.

charm-helpers is patched at [1] to solve the issue and this is a
charm-helpers sync that includes that patch.  This changes the
functionality of the IdentityServiceContext so that it preferentially
selects keys from the application data bag unless they are None, in
which case it tries for those keys on the existing relation data. e.g.
it will stitch the two relations together with the app data bag taking
priority. This allows the nova-cloud-controller charm to correctly
access the identity relation data and form a complete context.

[1] juju/charm-helpers#746

Change-Id: Ic868213c6bb42bc2a28ad25a2f7344a28ab9f04d
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Nov 7, 2022
* Update charm-nova-cloud-controller from branch 'master'
  to 1d06b80c8dfb5ce4aa5fa74ac444d6af961053b0
  - ch-sync: IndentityServiceContext app data fixes
    
    The IdentityServiceContext was recently updated to add the application
    data bag. Unfortunately, they keystone charm uses both the regular
    relation data primarily, but the updates for endpoints are on both the
    application database and the regular relation data. The
    IdentityServiceContext used the app data bag exclusively if there were
    any keys available, which leads to it ignoring the existing relation
    data entirely; this results in 'identity relation not ready' with
    missing data items.
    
    charm-helpers is patched at [1] to solve the issue and this is a
    charm-helpers sync that includes that patch.  This changes the
    functionality of the IdentityServiceContext so that it preferentially
    selects keys from the application data bag unless they are None, in
    which case it tries for those keys on the existing relation data. e.g.
    it will stitch the two relations together with the app data bag taking
    priority. This allows the nova-cloud-controller charm to correctly
    access the identity relation data and form a complete context.
    
    [1] juju/charm-helpers#746
    
    Change-Id: Ic868213c6bb42bc2a28ad25a2f7344a28ab9f04d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants