0.38.6_agent_hotfix

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-19 08:53:34 +01:00
1 parent 1239ff524d
commit d4a604970e
14 files changed
+478 -162

No files matched your search

+3 -1
View File
@@ -131,8 +131,10 @@ RustProxy 0.37.0 and newer request `GET /v1/inventory?system=1`; the agent then
## API and troubleshooting
The API is `GET /v1/inventory` with `Authorization: Bearer <token>`; `GET /healthz` has no inventory and requires no token. Both use HTTPS by default. Plain HTTP is possible with `RUSTPROXY_DOCKER_AGENT_TLS=false` but exposes credentials in transit; use it only in a secured network and never across the public Internet.
The API is `GET /v1/inventory` with `Authorization: Bearer <token>`; `GET /healthz` has no inventory and requires no token. Both use HTTPS by default. Up to **two authenticated inventory requests** are processed at once; additional polls immediately receive HTTP **503** and `Retry-After: 1`. Clients should retry with backoff. `POST /v1/enroll` allows a burst of six attempts, refilling at one attempt per second, across all clients. Excess attempts receive HTTP **429** and `Retry-After: 1`; one-time codes are not consumed on 429. Use firewall allowlists to prevent untrusted clients from exhausting the shared rate limit. Plain HTTP is possible with `RUSTPROXY_DOCKER_AGENT_TLS=false` but exposes credentials in transit; use it only in a secured network and never across the public Internet.
- **Agent process diagnostics:** authenticated `GET /v1/diagnostics` (same Bearer token) returns JSON with `rss_bytes` (resident memory), `go_heap_alloc_bytes`, `goroutines` and `open_fds` (RSS and FD counts use Linux `/proc` and are omitted where unavailable). This is an on-demand process snapshot, not Prometheus metrics and not stored over time. `GET /healthz` intentionally contains no sensitive diagnostics. Sample repeatedly to determine whether resident memory or descriptor counts grow after the cache warms up.
- **Busy inventory or provisioning:** HTTP 503 on `/v1/inventory` or HTTP 429 on `/v1/enroll` means the bounded work/rate limits are active; honor `Retry-After: 1` before retrying. The systemd agent accepts request headers for up to 3 seconds, request reads for up to 5 seconds and response writes for up to 12 seconds.
- `no valid token`: execute `sudo rustproxy-docker-agent init`; check env file permissions and `EnvironmentFile`.
- `container socket unavailable`: install/start Docker Engine (or `podman.socket`), check `/var/run/docker.sock` / `/run/podman/podman.sock`, the `docker` group and membership of `rustproxy-docker-agent`.
- `TLS certificate/key`: inspect ownership of `/var/lib/rustproxy-docker-agent/`, mode `0600` on the private key, and both certificate/key paths. Refuse partially missing pairs rather than overwriting them.