Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
controlplane, router: name the peer in the refusal and the router in the drain
Antonio Ojea70fbb220ac4c
diff --git a/internal/controlplane/server.go b/internal/controlplane/server.goindex d35fa1b0..bce3d55b 100644--- a/internal/controlplane/server.go+++ b/internal/controlplane/server.go@@ -1924,7 +1924,13 @@ func (s *Server) admittedNode(r *http.Request) (*storage.EnrolledNode, error) {}peerID, err := identity.VerifyAndExtractPeerID(trustedKeys, biscuitBytes, s.config.BiscuitTimeout)if err != nil {- refuseMember(r, refusalInvalidBiscuit, "", err)+ // For the log line only: a credential this control plane signed+ // and that has since expired still names its node.+ var signedBy string+ if pID, signedErr := identity.VerifyExpiredAndExtractPeerID(trustedKeys, biscuitBytes, s.config.BiscuitTimeout); signedErr == nil {+ signedBy = pID.String()+ }+ refuseMember(r, refusalInvalidBiscuit, signedBy, err)return nil, nil}nodeRecord, err := s.store.GetNode(r.Context(), peerID.String())diff --git a/internal/router/goaway.go b/internal/router/goaway.goindex 4b840374..8eac8aa1 100644--- a/internal/router/goaway.go+++ b/internal/router/goaway.go@@ -139,7 +139,6 @@ func (r *Router) drainMembers() {logger.Infow("[GoAway] Draining: no members attached, nothing to send away", "router_id", r.Host.ID().String())return}- }retryAfter := r.config.ShutdownLeaseTTLif retryAfter <= 0 {retryAfter = DefaultShutdownLeaseTTL