control/controlclient: handle 429 responses during node registration

If we get a 429 response during node registration, use the `Retry-After`
header for backoff instead of the regular exponential backoff.

The rate limiter error is propagated to the user, just like other
registration errors are, e.g.

```
$ tailscale up
backend error: node registration rate limited; will retry after 57s
exit status 1
```

Updates tailscale/corp#39533

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov
2026-04-14 13:27:06 +01:00
committed by Anton Tolchanov
parent d8190e0de5
commit 958bcda5bf
6 changed files with 282 additions and 2 deletions
+2 -1
View File
@@ -183,7 +183,8 @@ type CapabilityVersion int
// - 134: 2026-03-09: Client understands [NodeAttrDisableAndroidBindToActiveNetwork]
// - 135: 2026-03-30: Client understands [NodeAttrCacheNetworkMaps]
// - 136: 2026-04-09: Client understands [NodeAttrDisableLinuxCGNATDropRule]
const CurrentCapabilityVersion CapabilityVersion = 136
// - 137: 2026-04-15: Client handles 429 responses to /machine/register.
const CurrentCapabilityVersion CapabilityVersion = 137
// ID is an integer ID for a user, node, or login allocated by the
// control plane.