Skip to content

Commit

Permalink
Fix incorrect Adding shard to config-server status (#497)
Browse files Browse the repository at this point in the history
Co-authored-by: Neha Oudin <[email protected]>
  • Loading branch information
MiaAltieri and Gu1nness authored Oct 3, 2024
1 parent a100f6c commit cf11703
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/charms/mongodb/v1/shards_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 10
LIBPATCH = 11

KEYFILE_KEY = "key-file"
HOSTS_KEY = "host"
Expand Down Expand Up @@ -557,7 +557,7 @@ def __init__(
super().__init__(charm, self.relation_name)

self.framework.observe(
charm.on[self.relation_name].relation_joined, self._on_relation_joined
charm.on[self.relation_name].relation_created, self.relation_created
)
self.framework.observe(
charm.on[self.relation_name].relation_changed, self._on_relation_changed
Expand Down Expand Up @@ -687,7 +687,7 @@ def sync_cluster_passwords(
# after updating the password of the backup user, restart pbm with correct password
self.charm._connect_pbm_agent()

def _on_relation_joined(self, event: RelationJoinedEvent):
def relation_created(self, event: RelationJoinedEvent):
"""Sets status and flags in relation data relevant to sharding."""
# if re-using an old shard, re-set flags.
self.charm.unit_peer_data["drained"] = json.dumps(False)
Expand Down

0 comments on commit cf11703

Please sign in to comment.