Skip to content

Commit

Permalink
Update config_server_interface.py (#467)
Browse files Browse the repository at this point in the history
## Issue
charm uses incorrect config `Config.K8S_SUBSTRATE `

## Solution
make it use the correct one
  • Loading branch information
MiaAltieri authored Aug 24, 2024
1 parent 00326a5 commit 267f24d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/charms/mongodb/v0/config_server_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,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


class ClusterProvider(Object):
Expand Down Expand Up @@ -373,7 +373,7 @@ def is_mongos_running(self) -> bool:
connection_uri = f"mongodb://{self.charm.get_mongos_host()}"

# use the mongos port for k8s charms and external connections on VM
if self.substrate == Config.K8S_SUBSTRATE or self.charm.is_external_client:
if self.substrate == Config.Substrate.K8S or self.charm.is_external_client:
connection_uri = connection_uri + f":{Config.MONGOS_PORT}"

with MongosConnection(None, connection_uri) as mongo:
Expand Down

0 comments on commit 267f24d

Please sign in to comment.