api-endpoints should use the API rather than direct Provider State access

Bug #1268470 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
John A Meinel

Bug Description

Right now the "juju api-endpoints" command goes directly to the environment storage and reads the provider-state file. Instead, it should try to connect to the API itself, and make an RPC request for the endpoints, and only if it fails at doing that should it fall back to using direct provider-state access.

We'll need to confirm if the RPC was available in 1.16, though if the fallback is done well, then it should be straightforward to maintain 1.16 compatibility.

Tags: api

Related branches

John A Meinel (jameinel)
Changed in juju-core:
assignee: nobody → John A Meinel (jameinel)
status: Triaged → In Progress
Martin Packman (gz)
Changed in juju-core:
milestone: 1.17.1 → 1.18.0
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

Most of the reason for this command is to help client applications connect as quickly as possible to an api server, doing one-two round trips is just adding latency since the core cli already relies on the value it has cached. Ie. the stateservers value already exist in the jenv file, Core can be responsible for updating that and having an api-servers API to rely on for that purpose. Clients just want to connect as quickly as possible to a server, once they have they can use the api to discover additional endpoints if they care to.

Go Bot (go-bot)
Changed in juju-core:
status: In Progress → Fix Committed
John A Meinel (jameinel)
Changed in juju-core:
milestone: 1.20.0 → 1.19.1
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
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.