mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 08:17:27 +00:00
fix: harden gateway control-plane restart protections
This commit is contained in:
@@ -370,6 +370,10 @@ Most fields hot-apply without downtime. In `hybrid` mode, restart-required chang
|
||||
|
||||
## Config RPC (programmatic updates)
|
||||
|
||||
<Note>
|
||||
Control-plane write RPCs (`config.apply`, `config.patch`, `update.run`) are rate-limited to **3 requests per 60 seconds** per `deviceId+clientIp`. When limited, the RPC returns `UNAVAILABLE` with `retryAfterMs`.
|
||||
</Note>
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="config.apply (full replace)">
|
||||
Validates + writes the full config and restarts the Gateway in one step.
|
||||
@@ -386,6 +390,8 @@ Most fields hot-apply without downtime. In `hybrid` mode, restart-required chang
|
||||
- `note` (optional) — note for the restart sentinel
|
||||
- `restartDelayMs` (optional) — delay before restart (default 2000)
|
||||
|
||||
Restart requests are coalesced while one is already pending/in-flight, and a 30-second cooldown applies between restart cycles.
|
||||
|
||||
```bash
|
||||
openclaw gateway call config.get --params '{}' # capture payload.hash
|
||||
openclaw gateway call config.apply --params '{
|
||||
@@ -410,6 +416,8 @@ Most fields hot-apply without downtime. In `hybrid` mode, restart-required chang
|
||||
- `baseHash` (required) — config hash from `config.get`
|
||||
- `sessionKey`, `note`, `restartDelayMs` — same as `config.apply`
|
||||
|
||||
Restart behavior matches `config.apply`: coalesced pending restarts plus a 30-second cooldown between restart cycles.
|
||||
|
||||
```bash
|
||||
openclaw gateway call config.patch --params '{
|
||||
"raw": "{ channels: { telegram: { groups: { \"*\": { requireMention: false } } } } }",
|
||||
|
||||
Reference in New Issue
Block a user