`controller-url` config value set on controller charm is badly formatted

Bug #2031476 reported by Jordan Barrett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

The `controller-url` config key is set on the controller charm. This value is passed to apps related to the controller charm (juju-dashboard, prometheus, etc) so that they can locate the controller.

However, on some clouds (e.g. microk8s), this value is incorrectly formatted.
```
$ juju bootstrap microk8s c
$ juju switch controller
$ juju config controller controller-url
wss://[10.152.183.158:0]:17070/api
```

Tested on:
- Juju version version: 3.1-d48908d
- microk8s v1.26.7
- Ubuntu 20.04.6 LTS

Revision history for this message
Jordan Barrett (barrettj12) wrote :

On this note, we shouldn't be providing the full URL with 'wss://' and '/api'. In many cases, consumers just have to strip this part to get what they actually want. See
https://github.com/canonical/juju-dashboard-charm/blob/eeb083d/machine-charm/src/charm.py#L86
https://github.com/canonical/juju-dashboard-charm/blob/eeb083d/k8s-charm/lib/charms/juju_dashboard/v0/juju_dashboard.py#L81-L88

We should deprecate `controller-url` and instead provide just the controller IP and port, without the scheme or API endpoint (either as two separate keys, or as one key 'host:port').

Changed in juju:
importance: Undecided → Low
status: New → Triaged
milestone: none → 3.1.6
Changed in juju:
milestone: 3.1.6 → 3.1.7
Changed in juju:
milestone: 3.1.7 → 3.1.8
Changed in juju:
milestone: 3.1.8 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.