From e0dd9bc912210b693f92487949584b625e912e0d Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Thu, 9 Jan 2025 19:08:18 +0200 Subject: [PATCH] Log the database name secret --- src/relations/db.py | 3 +++ tests/integration/helpers.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/relations/db.py b/src/relations/db.py index 78be49f6d2..1e4e6148cf 100644 --- a/src/relations/db.py +++ b/src/relations/db.py @@ -195,6 +195,8 @@ def set_up_relation(self, relation: Relation) -> bool: if not database: database = self.charm.get_secret(APP_SCOPE, f"{user}-database") + logger.error(f"!!!!!!!!!!!!!!!!!!!!!!!!11{database}") + # Store the user, password and database name in the secret store to be accessible by # non-leader units when the cluster topology changes. self.charm.set_secret(APP_SCOPE, user, password) @@ -337,6 +339,7 @@ def update_endpoints(self, relation: Relation = None) -> None: user = f"relation-{relation.id}" password = self.charm.get_secret(APP_SCOPE, user) database = self.charm.get_secret(APP_SCOPE, f"{user}-database") + logger.error(f"!!!!!!!!!!!!!!!!!!!!!!!!22{database}") # If the relation data is not complete, the relations was not initialised yet. if not database or not user or not password: diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index a876208829..34f05038a8 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -394,6 +394,9 @@ async def deploy_and_relate_bundle_with_postgresql( # Remove PostgreSQL and relations with it from the bundle.yaml file. config = data["applications"]["postgresql"]["options"] + # Limit the amount of max connections + if config["experimental_max_connections"] > 100: + config["experimental_max_connections"] = 150 for key, val in config.items(): config[key] = str(val) logger.info(f"Bundle {bundle_name} needs configuration {config}")