diff --git a/charms/worker/k8s/src/charm.py b/charms/worker/k8s/src/charm.py index 4a119bab..1f7fa628 100755 --- a/charms/worker/k8s/src/charm.py +++ b/charms/worker/k8s/src/charm.py @@ -286,7 +286,7 @@ def _bootstrap_k8s_snap(self): status.add(ops.MaintenanceStatus("Bootstrapping Cluster")) - binding = self.model.get_binding("juju-info") + binding = self.model.get_binding("cluster") address = binding and binding.network.ingress_address node_name = self.get_node_name() payload = CreateClusterRequest( diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 68feda01..abd249ab 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -266,7 +266,10 @@ async def deploy_model( status="active", timeout=30 * 60, ) - yield the_model + try: + yield the_model + except GeneratorExit: + log.fatal("Failed to determine model: model_name=%s", model_name) @pytest_asyncio.fixture(scope="module")