canonical / canonical/microcloud
Cluster Manager "LXD UI" link points to a single member's internal address — No existing path to advertise an HA/load-balancer URL
- Dominant language
- Go
- Stars
- 532
- Forks
- 83
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 36
Description
The "LXD UI" button on the Cluster Manager's cluster details page links to the first cluster member's internal cluster address (the cluster.https_address visible in lxc cluster list). This was found while running MicroCloud demo environments on GCP, where each cluster sits behind a TCP load balancer with a static address across all members (the address operators actually use), but the button links to one member's private IP instead.
Tracing the behavior, the value appears to originate in the connector's status heartbeat: enrichClusterMemberMetrics in cmd/microcloudd/cluster_manager_task.go sets ui_url from lxdMembers[0].URL, and the Cluster Manager stores and renders it as-is (in microcloud-cluster-manager: RemoteClusterStatusPost → remote_cluster_detail.go, refreshed on each heartbeat → ClusterUiButton.tsx). No configuration point was found along that path where an operator-supplied URL could be provided.
Concerns related to current limitations:
1. HA: production deployments front the UI with a VIP/load balancer across all members. Linking to one specific member means the button dies when that member is down for maintenance, even though the cluster and its LB remain healthy.
2. TLS: a member's private IP cannot carry the certificate an operator has issued for their DNS-named LB endpoint, so the link always produces browser warnings, even when the deployment has a perfectly clean HTTPS entry point.
3. Segmented networks: deployments that keep cluster-internal addresses on an isolated management network (exposing only the LB/DNS endpoint to operators) end up with a link that isn't reachable from the browsers meant to use it.
Request: a way to set the UI URL a cluster reports to the Cluster Manager, for example the load balancer's address or DNS name. If nothing is set, the current behavior stays the default. This could potentially be implemented in a preseed field or join field, or another mechanism that would work best.
Contributor guide
Research direction
Start in cmd/microcloudd/cluster_manager_task.go at enrichClusterMemberMetrics, then trace the value through RemoteClusterStatusPost, remote_cluster_detail.go, and ClusterUiButton.tsx. Review existing preseed and join configuration handling before choosing an operator-supplied URL path. Done means a configured URL is reported and rendered, the current member URL remains the default when unset, and relevant tests cover both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cloud, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100