[keystone-k8s] Run configure_charm before updating endpoints

In some cases, the wsgi-keystone process can be downed but the unit
considered bootstrap, run configure_charm first instead of last, to
ensure the unit is properly configured, and update endpoints.

Change-Id: Ib51944597d61023d0276556043a75b49dc0acb03
Signed-off-by: Guillaume Boutry <guillaume.boutry@canonical.com>
This commit is contained in:
Guillaume Boutry 2025-02-05 18:14:13 +01:00
parent 6ccb712624
commit d19b2f0451

View File

@ -1664,17 +1664,17 @@ export OS_AUTH_VERSION=3
def _ingress_changed(self, event: ops.framework.EventBase) -> None:
"""Ingress changed callback.
Invoked when the data on the ingress relation has changed. This will
update the keystone endpoints, and then call the configure_charm.
Invoked when the data on the ingress relation has changed. This will call
configure_charm, then update the keystone endpoints.
"""
logger.debug("Received an ingress_changed event")
self.configure_charm(event)
if self.bootstrapped():
self.keystone_manager.update_service_catalog_for_keystone()
if self.can_service_requests():
self.check_outstanding_identity_service_requests(force=True)
self.check_outstanding_identity_credentials_requests(force=True)
self.configure_charm(event)
def _sanitize_secrets(self, request: dict) -> dict:
"""Sanitize any secrets.