From 0f2ba76aeacb39fe9cfcab035190db0d38582710 Mon Sep 17 00:00:00 2001 From: Marcelo Henrique Neppel Date: Thu, 2 May 2024 16:33:19 -0300 Subject: [PATCH] Reload Patroni configuration when member is not ready yet Signed-off-by: Marcelo Henrique Neppel --- src/relations/async_replication.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/relations/async_replication.py b/src/relations/async_replication.py index 83f4017c84..1e4df96c88 100644 --- a/src/relations/async_replication.py +++ b/src/relations/async_replication.py @@ -377,6 +377,10 @@ def _handle_database_start(self, event: RelationChangedEvent) -> None: self.charm._set_primary_status_message() elif not self.charm.unit.is_leader(): + try: + self.charm._patroni.reload_patroni_configuration() + except RetryError: + pass raise NotReadyError() else: self.charm.unit.status = WaitingStatus(