From 267f24d3923d62fe2a754e92ea46591fdbc912ef Mon Sep 17 00:00:00 2001 From: Mia Altieri <32723809+MiaAltieri@users.noreply.github.com> Date: Sat, 24 Aug 2024 12:22:49 +0200 Subject: [PATCH] Update config_server_interface.py (#467) ## Issue charm uses incorrect config `Config.K8S_SUBSTRATE ` ## Solution make it use the correct one --- lib/charms/mongodb/v0/config_server_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/charms/mongodb/v0/config_server_interface.py b/lib/charms/mongodb/v0/config_server_interface.py index 0f7d2351f..cdb733d98 100644 --- a/lib/charms/mongodb/v0/config_server_interface.py +++ b/lib/charms/mongodb/v0/config_server_interface.py @@ -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): @@ -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: