Skip to content

Commit

Permalink
Prefer the cluster relation for bootstrap address rather than juju-in…
Browse files Browse the repository at this point in the history
…fo (#116)

* Prefer the cluster relation for bootstrap address rather than juju-info

* Address test failures
  • Loading branch information
addyess authored May 17, 2024
1 parent f6cae8c commit 679f72f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charms/worker/k8s/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,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")
Expand Down

0 comments on commit 679f72f

Please sign in to comment.