Skip to content

Commit

Permalink
fix: Only update databag is not shard (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gu1nness authored Oct 14, 2024
1 parent f0a7578 commit 0a0a6fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,8 @@ def _reconcile_mongo_hosts_and_users(self, event: RelationEvent) -> None:
self._add_units_from_replica_set(event, mongo, mongodb_hosts - replset_members)

# app relations should be made aware of the new set of hosts
self.client_relations.update_app_relation_data()
if not self.is_role(Config.Role.SHARD):
self.client_relations.update_app_relation_data()

except NotReadyError:
self.status.set_and_share_status(
Expand Down Expand Up @@ -1574,8 +1575,8 @@ def is_relation_feasible(self, rel_interface: str) -> bool:
)
logger.error(
"Charm is in sharding role: %s. Does not support %s interface.",
rel_interface,
self.role,
rel_interface,
)
return False

Expand Down

0 comments on commit 0a0a6fe

Please sign in to comment.