diff --git a/psycopg2-2.9.10-cp310-cp310-linux_x86_64.whl b/psycopg2-2.9.10-cp310-cp310-linux_x86_64.whl new file mode 100644 index 0000000000..604572cba3 Binary files /dev/null and b/psycopg2-2.9.10-cp310-cp310-linux_x86_64.whl differ diff --git a/src/charm.py b/src/charm.py index 37fbfb1552..22f1b4dc4f 100755 --- a/src/charm.py +++ b/src/charm.py @@ -1716,6 +1716,14 @@ def update_config(self, is_creating_backup: bool = False) -> bool: return True if not self._patroni.member_started: + if enable_tls: + logger.debug( + "Early exit update_config: patroni not responding but TLS is enabled." + ) + self.unit_peer_data.update({"tls": "enabled"}) + self.postgresql_client_relation.update_endpoints() + # self._handle_postgresql_restart_need(True) + return True logger.debug("Early exit update_config: Patroni not started yet") return False diff --git a/tests/integration/test_subordinates.py b/tests/integration/test_subordinates.py index be9be926cc..2e2772236b 100644 --- a/tests/integration/test_subordinates.py +++ b/tests/integration/test_subordinates.py @@ -35,7 +35,6 @@ async def test_deploy(ops_test: OpsTest, charm: str, github_secrets): config={"token": github_secrets["UBUNTU_PRO_TOKEN"]}, channel="latest/edge", num_units=0, - base=CHARM_BASE, ), ops_test.model.deploy( LS_CLIENT, @@ -46,7 +45,6 @@ async def test_deploy(ops_test: OpsTest, charm: str, github_secrets): }, channel="latest/edge", num_units=0, - base=CHARM_BASE, ), ) diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py index 650dbe689d..9b38d7ec3e 100644 --- a/tests/unit/test_charm.py +++ b/tests/unit/test_charm.py @@ -1338,6 +1338,7 @@ def test_update_config(harness): harness.update_relation_data( rel_id, harness.charm.unit.name, {"tls": ""} ) # Mock some data in the relation to test that it doesn't change. + _is_tls_enabled.return_value = False harness.charm.update_config() _handle_postgresql_restart_need.assert_not_called() assert "tls" not in harness.get_relation_data(rel_id, harness.charm.unit.name)