Skip to content

Commit

Permalink
Wait for primary endpoint before starting the primary
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirp committed Feb 22, 2024
1 parent d50d669 commit 90437a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ def _start_primary(self, event: StartEvent) -> None:
return

# Assert the member is up and running before marking it as initialised.
if not self._patroni.member_started:
if not self._patroni.member_started or not self.primary_endpoint:
logger.debug("Deferring on_start: awaiting for member to start")
self.unit.status = WaitingStatus("awaiting for member to start")
event.defer()
Expand Down

0 comments on commit 90437a7

Please sign in to comment.