Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect Adding shard to config-server status #497

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading