Skip to content

Commit

Permalink
fix: need to be leader
Browse files Browse the repository at this point in the history
  • Loading branch information
Gu1nness committed Sep 23, 2024
1 parent 40911f1 commit cc96d33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/charms/mongodb/v0/config_server_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ def _on_relation_changed(self, event) -> None:
return

self.charm.status.set_and_share_status(ActiveStatus())
self.charm.mongos_initialised = True
if self.charm.unit.is_leader():
self.charm.mongos_initialised = True

def _on_relation_broken(self, event: RelationBrokenEvent) -> None:
# Only relation_deparated events can check if scaling down
Expand Down

0 comments on commit cc96d33

Please sign in to comment.