Skip to content

Commit

Permalink
small fixes to pr request changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Mar 11, 2024
1 parent 50f2976 commit 1400e30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/charms/mongodb/v1/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def get_mongos_args(
cmd.extend(
[
"--clusterAuthMode=keyFile",
f"--keyFile={KEY_FILE}",
f"--keyFile={full_conf_dir}/{KEY_FILE}",
]
)

Expand Down
14 changes: 10 additions & 4 deletions lib/charms/mongodb/v1/shards_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ def cluster_password_synced(self) -> bool:
return False
raise
except ServerSelectionTimeoutError as e:
# Connection refused, - this occurs when internal membership via TLS is not in sync
# across the cluster.
# Connection refused, - this occurs when internal membership is not in sync across the
# cluster (i.e. TLS + KeyFile).
if e.code == 111:
return False
raise
Expand Down Expand Up @@ -952,6 +952,12 @@ def _is_added_to_cluster(self) -> bool:
return False

raise
except ServerSelectionTimeoutError as e:
# Connection refused, - this occurs when internal membership is not in sync across the
# cluster (i.e. TLS + KeyFile).
if e.code == 111:
return False
raise

def cluster_password_synced(self) -> bool:
"""Returns True if the cluster password is synced for the shard."""
Expand All @@ -973,8 +979,8 @@ def cluster_password_synced(self) -> bool:
return False
raise
except ServerSelectionTimeoutError as e:
# Connection refused, - this occurs when internal membership via TLS is not in sync
# across the cluster.
# Connection refused, - this occurs when internal membership is not in sync across the
# cluster (i.e. TLS + KeyFile).
if e.code == 111:
return False
raise
Expand Down

0 comments on commit 1400e30

Please sign in to comment.