From d19b2f0451bda2acd88f179e2dc792c20f787dd7 Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Wed, 5 Feb 2025 18:14:13 +0100 Subject: [PATCH] [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 --- charms/keystone-k8s/src/charm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charms/keystone-k8s/src/charm.py b/charms/keystone-k8s/src/charm.py index 497beb4c..68e0ab35 100755 --- a/charms/keystone-k8s/src/charm.py +++ b/charms/keystone-k8s/src/charm.py @@ -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.