hub v0.51.0: DR-tier-by-default — per-customer dr_tier flag (default ON, legacy backfill from reality), cascade stages, WG-registration auto-provision hook, offsite-requires-DR guard (F-6 policy), host-page capability chips (inactive=neutral)
Claude-Session: https://claude.ai/code/session_01NptTCFtu7dz2Ru89qHRagN
This commit is contained in:
@@ -295,6 +295,13 @@ func (h *Handler) handleRegisterHostWG(w http.ResponseWriter, r *http.Request, p
|
||||
return
|
||||
}
|
||||
syncStatus = h.syncAfterMutation(r.Context())
|
||||
// v0.51.0 DR-tier cascade (scenario A): a NEW tunnel peer may be the pbs_dr descriptor's
|
||||
// last unmet precondition — fire the hook so a DR-ON customer provisions hands-free.
|
||||
// Detached goroutine: registration must never wait on (or fail over) ep0 provisioning;
|
||||
// the hook itself detaches+bounds its context and logs every outcome.
|
||||
if h.wgRegisteredHook != nil && host.CustomerID != "" {
|
||||
go h.wgRegisteredHook(context.WithoutCancel(r.Context()), host.CustomerID)
|
||||
}
|
||||
}
|
||||
h.logger.Printf("[INFO] wg registered: host=%s pubkey=%s ip=%s/32 changed=%v gen=%d sync=%s",
|
||||
pathHostID, req.Pubkey, ip, changed, gen, syncStatus)
|
||||
|
||||
Reference in New Issue
Block a user