Skip to content

Commit

Permalink
Reload Patroni configuration when member is not ready yet
Browse files Browse the repository at this point in the history
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
  • Loading branch information
marceloneppel committed May 2, 2024
1 parent 1fd2b77 commit 0f2ba76
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/relations/async_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 0f2ba76

Please sign in to comment.