Skip to content

host-agent: the host service decodes requests up to 32 MiB - #1788

Open
nikhilunni wants to merge 1 commit into
mainfrom
fix/host-rpc-decode-limit
Open

nikhilunni wants to merge 1 commit into
mainfrom
fix/host-rpc-decode-limit

Conversation

@nikhilunni

Copy link
Copy Markdown
Contributor

Problem

A live move of a session with 32 GiB of guest RAM failed and rolled back to the source host. The session stayed correct; the move did not happen.

The destination host refused the restore request: decoded message length too large: found 6023183 bytes, the limit is: 4194304 bytes. The request carries the memory manifest of the VM, and its size grows with guest RAM. The host service raised only its encode limit, so it decoded requests with tonic's 4 MiB default. The CI move tests use small VMs and stay below the limit.

Change

One constant, HOST_RPC_MAX_MESSAGE_BYTES (32 MiB), sets the client's decode limit and the server's encode and decode limits. The limit is a check; it allocates nothing.

Rollout

The change is in the host agent. A coordinator of either build works with it.

Test

the_host_accepts_a_request_above_the_tonic_default_limit: a 6 MiB request goes through the real server and the real client.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HNhpmz4QPYaVCE7tFna54D

The host service raised only its encode limit, so it decoded requests
with tonic's 4 MiB default. A live move's restore request carries the
memory manifest of the VM, about 6 MB for 32 GiB of guest RAM. The
destination refused it ("decoded message length too large"), each retry
failed the same way, and the move rolled back to the source.

One constant, HOST_RPC_MAX_MESSAGE_BYTES, now sets the client's decode
limit and the server's encode and decode limits.

Test: the_host_accepts_a_request_above_the_tonic_default_limit sends a
6 MiB request through the real server and client.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HNhpmz4QPYaVCE7tFna54D

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant