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) (#117)

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

* Address test failures
  • Loading branch information
addyess authored May 23, 2024
1 parent a775354 commit a2d6976
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 @@ -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")
Expand Down

0 comments on commit a2d6976

Please sign in to comment.