A standby's admin API is the leader's
The console and ctl on a standby showed its own empty view: nodes and replicas live in the leader's memory. A standby now passes /api/ to the leader over the agent port, with the cluster's certificates both ways; the leader answers only a certificate naming a control plane the store lists, and only while it leads. Control plane certificates are issued for client use as well, and server add reissues older ones. An agent's reconnect backoff starts again after a session that worked, so each failover it lives through no longer makes the next one slower. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
adef25d709
commit
1d1409faad
12 files changed
+510
-13
No files matched your search
@@ -1162,8 +1162,18 @@ func (a *API) removeModel(w http.ResponseWriter, r *http.Request) {
|
||||
writeJSON(w, http.StatusOK, Removed{Removed: name})
|
||||
}
|
||||
|
||||
func (a *API) summary(w http.ResponseWriter, _ *http.Request) {
|
||||
writeJSON(w, http.StatusOK, a.Summary())
|
||||
func (a *API) summary(w http.ResponseWriter, r *http.Request) {
|
||||
s := a.Summary()
|
||||
// Asked through a standby, which passes on the console's questions to
|
||||
// the leader: "this one" is the standby the console is on.
|
||||
if by := r.Header.Get("X-Llmgw-Forwarded-By"); by != "" && len(s.ControlPlanes.Members) > 0 {
|
||||
members := slices.Clone(s.ControlPlanes.Members)
|
||||
for i := range members {
|
||||
members[i].This = members[i].Name == by
|
||||
}
|
||||
s.ControlPlanes.Members = members
|
||||
}
|
||||
writeJSON(w, http.StatusOK, s)
|
||||
}
|
||||
|
||||
func (a *API) explainPlacement(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in new issue
Block a user