Skip to content

Commit

Permalink
add additional log
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Sep 29, 2023
1 parent 74398c9 commit 98ad1b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/charms/mongodb/v0/shards_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,15 @@ def _on_relation_changed(self, event):
if not self.charm.unit.is_leader():
return

# TODO Future work, see if needed to check for all units restarted / primary elected

try:
self.update_operator_password(new_password=relation_data.get(OPERATOR_PASSWORD_KEY))
except RetryError:
self.charm.unit.status = BlockedStatus("Shard not added to config-server")
logger.error(
"Shard could not be added to config server, failed to set operator password."
)
return

# TODO future PR, leader unit verifies shard was added to cluster
Expand Down

0 comments on commit 98ad1b1

Please sign in to comment.